Hello,
To preface this, I am relatively new at Stata, but I have been reading the documentation. I have a data set, of 122 vars, 7139 obs, and am attempting to reshape my panel data, using
running this returns
And many forum replies to this error state to use the string tag, but that returns
One post that seemed relatively similar to mine stated that a fix would be to rename the variables somehow...? (I don't really understand any of this.)
https://www.statalist.org/forums/for...-to-long-error
Either way, I would appreciate any help. Thanks!
for reference, here is a dataex description of a sample of my data, including my i(Year) j(UID) vars and 2 data vars.
To preface this, I am relatively new at Stata, but I have been reading the documentation. I have a data set, of 122 vars, 7139 obs, and am attempting to reshape my panel data, using
Code:
reshape wide * , i(Year) j(UID)
Code:
variable UID contains all missing values
Code:
reshape wide * , i(Year) j(UID) string variable UID is numeric r(109);
https://www.statalist.org/forums/for...-to-long-error
Either way, I would appreciate any help. Thanks!
for reference, here is a dataex description of a sample of my data, including my i(Year) j(UID) vars and 2 data vars.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int Year long(UID UGDS) byte HasRelaffil_Flag 2012 168528 1766 1 2014 168528 1570 1 2016 168528 1621 1 2008 168528 1469 1 2010 168528 1652 1 2018 100724 3903 0 2004 138716 3174 0 2006 138716 3474 0 2008 138716 3711 0 2010 138716 4154 0 2012 138716 3755 0 2014 138716 3261 0 2016 138716 2576 0 2018 168528 1781 1 2004 100654 5071 0 2006 100654 4958 0 2008 100654 4290 0 2010 100654 4930 0 2012 100654 4081 0 2014 100654 4206 0 2016 100654 4616 0 2018 100654 4990 0 2004 100724 4624 0 2006 100724 4584 0 2008 100724 4730 0 2010 100724 4882 0 2012 100724 5123 0 2014 100724 4811 0 2016 100724 4704 0 2018 138716 5545 0 end


Comment