Bookmark and Share

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]

st: Tips on working with multiple waves RAND HRS


From   Daniel Almar de Sneijder <dasneijder@gmail.com>
To   statalist@hsphsun2.harvard.edu
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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index