Statalist


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

st: RE: RE: stsplit for for data with multiple records per subject


From   "Weichle, Thomas" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: stsplit for for data with multiple records per subject
Date   Wed, 23 Dec 2009 13:28:36 -0600

Thank you very much Kieran!  This appears to be working correctly.  One
issue though.  There are some individuals for which they have missing
values for the variables in the foreach statement.  This only occurs in
the first record for certain individuals.  After going through your code
line by line, it appears to happen after the foreach statement and I'm
not sure if I understand why this is occurring when there should be
valid values.

foreach var of varlist dual_15_85_12mth  va_pcnt dual_15_85_claims
cross_over {
   by study_id: replace `var' = `var'[_n+1]
}

Tom Weichle
Math Statistician
Center for Management of Complex Chronic Care (CMC3)
Hines VA Hospital, Bldg 1, C202
708-202-8387 ext. 24261
[email protected] 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index