Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: reshape issue
From
R G <[email protected]>
To
[email protected]
Subject
st: reshape issue
Date
Wed, 20 Apr 2011 12:46:58 -0700 (PDT)
Hi Statalisters:
I'm having some problems with reshape, probably something really simple.
I have a long dataset with two variables: caseid yr. I want to reshape to wide,
so it would be: caseid y1999 y2000 y2001 etc.
caseid is a string variable, so I've converted yr to a string as well.
I do:
reshape wide yr, i(caseid) j(yr) string
and I get:
(note: j = 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010)
variable yr not found
Any advice?
Robin
*
* 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/