Hi, I have an example of dataset following and there is an issue with reshaping the formant from wide to long.
The code I ran to reshape is
Then I have only fips00, fips01, ... fips09. The rest variables from fips10 to fips19 is not produced as it used to be. This problem is associated with other variables as well. I have one error message at the end of the screen "( is not a valid command name)" so I believe that something went wrong to identify variable names in the program. Any comment and feedback would be appreciated!
Code:
clear input long(fips00 fips01 fips02 fips03 fips04 fips05 fips06 fips07 fips08 fips09 fips10 fips11 fips12 fips13 fips14 fips15 fips16 fips17 fips18 fips19) str3 fipschange long fipscounty . 48497 48497 48497 48497 48497 . . . . . . . . . . . . . . "No " 48497 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 48201 "No " 48201 . 48201 48201 . . . . . . . . . . . . . . . . . "No " 48201 . . . . . . . . . . . . . . . . . . . . "No " 48439 . 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 48113 "No " 48113 end
The code I ran to reshape is
Code:
reshape long sic emp empc fips dnbrating paydexmax paydexmin sales salesc, i(id) j(year) (j = 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 90 91 92 93 94 95 96 97 98 99)
Then I have only fips00, fips01, ... fips09. The rest variables from fips10 to fips19 is not produced as it used to be. This problem is associated with other variables as well. I have one error message at the end of the screen "( is not a valid command name)" so I believe that something went wrong to identify variable names in the program. Any comment and feedback would be appreciated!
Comment