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 wide to long
From
Michael McCulloch <[email protected]>
To
[email protected]
Subject
st: reshape wide to long
Date
Thu, 10 Apr 2014 18:32:01 -0700
Hello, I am trying to reshape the following dataset from wide to long:
id kcalpre kcalpost
1 5620 3910
2 5470 4220
3 5640 3885
with the command:
. reshape long kcal, i(id) j(timing)
I am receiving an error message:
variable timing contains all missing values.
I have specified:
- long is the type of reshaping
- kcal is the stem of the two variables I want to convert from wide to long: kcalpre and kcalpost
- i(id) uniquely identifies each variable in the wide format
- j(timing) is to specify that the suffix of kcal (pre and post) should be placed in the variable called -timing-
It seems I've followed the help file and tutorials. I'd appreciate any advice or corrections.
Best wishes,
Michael McCulloch
--
Pine Street Foundation, since 1989
124 Pine Street | San Anselmo | California | 94960-2674
P: (415) 407-1357 | F: (206) 338-2391 | http://www.PineStreetFoundation.org
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/