Hi,
I'm trying to merge 2 datasets based on 2 variables. I've got panel data where I have financial and non-financial information of firms for multiple years. I'd like to merge based on CIK code and year. However, I'm constantly getting an error. I checked the excel files and both datasets should merge based on year and cik. I'm doing a one-to-one merge.
Command:
merge 1:1 CIK year using "/Users/josephine/Downloads/oefenen firmfilings.dta"
Should year and CIK variable be an integer of string variable? The variable type of 'year' is "int" and for the variable 'CIK', the type is "long" in both datasets. Also, the variable names are the same in both datasets. This means it shouldn't get an error, right?
I hope I gave enough information to get a solution, thanks in advance!
Kind regards,
Josephine
I'm trying to merge 2 datasets based on 2 variables. I've got panel data where I have financial and non-financial information of firms for multiple years. I'd like to merge based on CIK code and year. However, I'm constantly getting an error. I checked the excel files and both datasets should merge based on year and cik. I'm doing a one-to-one merge.
Command:
merge 1:1 CIK year using "/Users/josephine/Downloads/oefenen firmfilings.dta"
Should year and CIK variable be an integer of string variable? The variable type of 'year' is "int" and for the variable 'CIK', the type is "long" in both datasets. Also, the variable names are the same in both datasets. This means it shouldn't get an error, right?
I hope I gave enough information to get a solution, thanks in advance!
Kind regards,
Josephine
Comment