Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Richard Murphy <r1ch4rd.murphy@gmail.com> |
To | statalist <statalist@hsphsun2.harvard.edu> |
Subject | st: Reshape with prefix using a varlist |
Date | Mon, 14 Mar 2011 17:13:44 -0700 |
Hi all, I want to reshape long data to wide, putting the 'j' string variable at the begging of the stub. This would be fine if I have a limited number of variables as i can just use the @ function. reshape wide @var1 @var2 @var3 @var4, i(instit year) j(LEVEL) string But this does not work if i use the variable list functionality of reshape. I would like to know if their is an easier way of doing this, rather than typing in all 244 variables preceded by @. reshape wide @var1-@var244, i(instit year) j(LEVEL) string Any ideas? Best regards Richard * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/