Hi All. Sorry for such a silly question, because I have read the help section in stata on this and I am continuing to get an error message.
I am working on 1:1 merge of two county-level data sets by year and fips variables but getting more an append. I thought it was because of an issue with fips variable (state and county codes), but I think it might be because one data set the year variable is in 4-digits and the other data set the variable is in 2 digits. I wanted to change the 4-digits into 2-digits. In a previous post from Clyde Schechter, he suggested very very helpful information on renaming year variable. But I am getting a continuous error message.
Not sure what to do. Here is a little sample of my variables
I am thinking once I can fix the year variable to two digits then the 1:1 merge between county-level data will merge accurately.
Thanks
Rene
Using Stata 12.1 on Mac OS Catalina
I am working on 1:1 merge of two county-level data sets by year and fips variables but getting more an append. I thought it was because of an issue with fips variable (state and county codes), but I think it might be because one data set the year variable is in 4-digits and the other data set the variable is in 2 digits. I wanted to change the 4-digits into 2-digits. In a previous post from Clyde Schechter, he suggested very very helpful information on renaming year variable. But I am getting a continuous error message.
Code:
rename *20# *#
Code:
variable *20?* not found // error message I am receiving
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input long fips_code int year 1001 2013 1001 2014 1001 2016 1001 2015 1001 2012 1003 2014 1003 2012 1003 2016 1003 2015 1003 2013 end
Thanks
Rene
Using Stata 12.1 on Mac OS Catalina
Comment