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: RE: Analyzing Multiple Records in Stata
From
Nick Cox <[email protected]>
To
"'[email protected]'" <[email protected]>
Subject
st: RE: Analyzing Multiple Records in Stata
Date
Tue, 8 Mar 2011 18:56:09 +0000
This is a -reshape- followed by -egen, rowmean()-.
Nick
[email protected]
Erin Mead
I am sure there is probably an easy way to do this in Stata, but I
cannot figure it out. I am working with a data set in which the
participants were interviewed multiple times (up to 9). Each row of
the data set is for one interview with one participant. So, each
participant has 9 rows, one for each interview. Like so:
id interview var1 var2 ...
2 1 5.5 6.9
2 2 3.4 9.0
...
There are only a few variables in the data set. I would like to create
one row for each participant, and each variable be the average of that
variable across the interviews. This isn't a survival analysis (there
are no failures), so I thought stset would be inappropriate. Any
suggestions?
*
* 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/