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
0 Response to Renaming year variable
Post a Comment