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]

From |
"Michelson, Ethan" <emichels@indiana.edu> |

To |
"statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Need help with -collapse- or a better solution |

Date |
Sat, 1 May 2010 10:05:53 -0400 |

I'm no pro, but it seems to me the "reshape" command might be more relevant. If you have a variable that identifies 8 observations per unique id, then you can use reshape to create put all 8 observations on a single row. Then you can perform simple arithmetic to calculate the changes that interest you. But if you're interested in estimating models of change over time, then I think you'll need to bone up on event history analysis. In this case, the "snapspan" command might be relevant as a way to convert your data to something Stata can use to perform the appropriate analyses. Again, I'm a Stata novice and just signed up to this list today.... Good luck! Ethan -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Reifschneider Harry III Sent: Saturday, May 01, 2010 11:37 AM To: statalist@hsphsun2.harvard.edu Subject: st: Need help with -collapse- or a better solution Statalisters, Stata/IC 10.1 for Macintosh Born 01 Oct 2009 I need help with -collapse-. I am a grad student and thus just learning this software (and this is my first post), so please be gentle! I have 8 years of data which are broken out into 1 year snapshots, so 8 observations max for each person. I need to find a "change" in a test score (afqtscore for this example, but there are 5 total). Not all the observations have a change and thus I am only concerned with those that do change. The -help collapse- command talks about percentiles, means, etc., but I need the actual change, e.g. years 1-4 score is 50 and in year 5 the score changed to 60 and then remains that way for the duration of the sample. I am looking at the probability of an increase/decrease in the score and the magnitude of change and need to know if there is a change and also the amount. Further more, I am only interested in the demographics (gender, age,marital status, etc.) at the time of the "updated" or newer score. Same thing goes for "civilianeduclevelcode1" . Can someone show me an example of the code to write to get at this requirement? If my description of the problem is lacking, I am sorry and can try better. Thanks and have a great weekend! seqnumber is the "snapshot" of the fiscal year uniqID afqtscore seqnumber primarymos maritalstatuscode civilianeduclevelcode1 A17082 42 199 9900 S 12 A17082 42 211 341 M 12 A17082 48 223 341 M 12 A17082 48 235 341 M 12 A17082 79 247 341 M 14 * * 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/ * * 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/

- Prev by Date:
**Re: st: Need help with -collapse- or a better solution** - Next by Date:
**Re: st: Stata 11 - Factor variables in a regression command** - Previous by thread:
**Re: st: Need help with -collapse- or a better solution** - Next by thread:
**Re: st: using Stata to detect interviewer fraud** - Index(es):