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]

st: Tips on working with multiple waves RAND HRS


From   Daniel Almar de Sneijder <[email protected]>
To   [email protected]
Subject   st: Tips on working with multiple waves RAND HRS
Date   Mon, 17 Sep 2012 11:55:46 -0400

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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index