I have two datasets, ret and market_return. The ret file has more observations. To find intersection, I tried the following code.
Am I using wrong code or is something wrong with my data format?
Code:
merge 1:m company_id using ret variable company_id does not uniquely identify observations in the master data r(459);
Code:
. describe Contains data from F:\Stata Working Directory\market_return.dta obs: 11,008 vars: 3 2 Jun 2018 17:20 size: 110,080 -------------------------------------------------------------------------------------------------------------------------- storage display value variable name type format label variable label -------------------------------------------------------------------------------------------------------------------------- date int %td company_id long %12.0g company_id2 market_return long %45.0g market_return2 -------------------------------------------------------------------------------------------------------------------------- Sorted by: company_id
Code:
. describe Contains data from F:\Stata Working Directory\ret.dta obs: 94,085 vars: 3 2 Jun 2018 16:39 size: 940,850 -------------------------------------------------------------------------------------------------------------------------- storage display value variable name type format label variable label -------------------------------------------------------------------------------------------------------------------------- date int %td company_id long %12.0g company_id2 ret long %45.0g ret2 -------------------------------------------------------------------------------------------------------------------------- Sorted by: company_id
Comment