Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: reshape long and variables not being found


From   Nanlesta Pilgrim <nanlesta@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: reshape long and variables not being found
Date   Tue, 13 Jul 2010 18:03:53 -0400

Hello,

My data set is compose of adolescents and their parents and is
currently in wide format.  Families are followed over 4 years.
Therefore I have many variables with the same name for parents and
adolescents with the suffix, "p," indicating  for parent.  For
example, the variable for HIV status of the adolescent and parent:

hiv2000 hiv2001 hiv2002 hiv2003 hivp2000 hivp2001 hivp2002 hivp2003.

In stata my code is:
reshape long hiv hivp, i(curr_id) j(years)

Stata returns:
variable hivp2000 not found

Of course there are several variables in the reshape command.  If I
simply use "hiv" and not hivp, then the dataset reshapes but my parent
variables do not reshape.  Additionally, some parent variables are
recognized while others are not.  Why aren't some of the parents'
variables being recognize?

Thanks
Nandy
*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index