Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# RE: st: Tips on working with multiple waves RAND HRS

 From meenakshi beri To Subject RE: st: Tips on working with multiple waves RAND HRS Date Mon, 17 Sep 2012 13:03:48 -0400

```
Dear  D. Sneijder,

What I had done while working with  RAND HRS dataset was this:  I had created a new variable rincome in which I had stacked income (r1income,r2income,r3income,.....) from all waves by hhidpn (ID variable) and wave. However, there might be a more efficient way to do that which I am not aware of.
Then you can calculate the mean of rincome.

Regards,
Meenakshi

Meenakshi Beri
Department of Economics
Central Michigan University
beri1m@cmich.edu

"Let yourself be driven forward by your highest dreams. Feel the fears and learn from them, but don’t let yourself be held back by them."
"It is not success that brings happiness. It is happiness that brings success."
— Ralph Marston

> Date: Mon, 17 Sep 2012 11:55:46 -0400
> Subject: st: Tips on working with multiple waves RAND HRS
> From: dasneijder@gmail.com
> To: statalist@hsphsun2.harvard.edu
>
> Dear statalist,
>
> I am currently working with a RAND HRS dataset consisting of 8 waves
> of observations. This implies that for a single variable, such as
> income, the dataset consits of 8 variables of observations, for
> instance r1income, r2income,..., r8income. This works fine when
> considering the effects seperately, i.e. if I want to calculate mean
> in wave 1 and 8, but it is a bit comprehensive when one wants to
> retrieve the mean of the full dataset.
>
> Additionally I have variables that weight the observations,
> r1wtresp,...r8wtresp. My question is whether you have some tips on how
> to calculate for instance the weighted mean of the full dataset of 8
> waves.
>
> I know that when I calculate the sample mean per wave I can use the command
> mean(r1income) [pweight = r1wtresp]
> mean(r2income) [pweight = r2wtresp]
> mean(r3income) [pweight = r3wtresp]
> .. etc
>
> But how do I do it when I want the mean of all observations (something
> like stacking all variables under eachother and then treating it as
> one variable).
>
> Thanks!
>
> Regards,
> D. Sneijder
> *
> * 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/
```