Bookmark and Share

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 long and variables not being found


From   Nanlesta Pilgrim <[email protected]>
To   [email protected]
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index