I have tried to look for similar queries but couldn't find any. Thanks in advance for reading this.
I have two datasets: 1) is a panel ordered by (Code, Year); 2) Is basically a table that matches the Code in 1) with finer categories.
Example: code "10" represents CEOs and Legislators in 1) and corresponds with two categories in two "11-1011" (CEOs) and "11-1031" (Legislators).
I am using the following command: merge m:m ACSCode using ONET_ACS_crosswalk
Extract of dataset 2)(ONET_ACS_crosswalk) :
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str7 SOC2010Code str112 NationalEmploymentMatrixSOCO int ACSCode str128 ACSOccupationalTitle "11-1031" "Legislators" 10 "Chief executives and legislators" "11-1011" "Chief executives" 10 "Chief executives and legislators" end
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int ACSCode str156 ACSTitle int year str7 SOC2010Code str112 NationalEmploymentMatrixSOCO 10 "Chief executives and legislators" 2006 "11-1031" "Legislators" 10 "Chief executives and legislators" 2006 "11-1011" "Chief executives" 10 "Chief executives and legislators" 2006 "11-1011" "Chief executives" 10 "Chief executives and legislators" 2006 "11-1011" "Chief executives" .... 10 "Chief executives and legislators" 2007 "11-1011" "Chief executives" 10 "Chief executives and legislators" 2007 "11-1011" "Chief executives" 10 "Chief executives and legislators" 2007 "11-1011" "Chief executives" 10 "Chief executives and legislators" 2007 "11-1011" "Chief executives" .... end
I hope I have been somehow clear, I am sorry if I was not. Please ask me how to clarify if needed, any criticism or suggestion is highly appreciated.
Thanks,
Francesco
0 Response to Merge m:m in a panel, can't merge BY two variables
Post a Comment