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]

Re: st: RE: Analyzing Multiple Records in Stata


From   Erin Mead <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: Analyzing Multiple Records in Stata
Date   Tue, 8 Mar 2011 14:13:17 -0500

Great. It worked perfectly. Thanks!

Erin
PhD student



On Tue, Mar 8, 2011 at 1:56 PM, Nick Cox <[email protected]> wrote:
> 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/
>

*
*   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