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: svy + aweights


From   Joerg Luedicke <[email protected]>
To   [email protected]
Subject   Re: st: svy + aweights
Date   Thu, 10 Nov 2011 15:06:20 -0500

I do not quite understand what you are trying to do. Suppose we have
two individuals, one measured only once and the other on, say, 3
occasions. Let's further assume that activity is measured in minutes
(btw, how is your dependent variable measured?). We could have the
following data:

id day1 day2 day3
1  30
2  10  10  10

If you calculate the minutes per day now (whether or not this being a
proper way of handling it), id#1 will end up with 30 and id#2 with 10
minutes. I do not understand why id#2 is supposed to weigh more than
id#1?

J.


On Thu, Nov 10, 2011 at 2:34 PM, Jeph Herrin <[email protected]> wrote:
> Thanks for the suggestion, but I specifically need to give more
> weight to subjects which have more days of observation. For example,
> I have
>
>   svy : regress activity female BMI
>
> and would like this regression to give more weight to subjects which
> have more days of observation. Using activity/days as the dependent
> variable will not do this.
>
> Jeph
>
> On 11/10/2011 1:58 PM, Stas Kolenikov wrote:
>>
>> Rather than forming the mean activity per day, you might want to
>> analyze this as a ratio:
>>
>> svy : ratio activity / day_reported
>>
>> or whatever would be an appropriate ratio. That way, you will get
>> correct standard errors without messing with the analytical weights.
>>
>> On Thu, Nov 10, 2011 at 1:46 PM, Jeph Herrin<[email protected]>  wrote:
>>>
>>> I am analyzing NHANES data (see manual page for -svyset-) using -svy-
>>> commands. My complication is that I am using the subset of subjects for
>>> which there is activity monitoring, and the number of days monitored
>>> varies
>>> from 1 to 8. So - to be clear - for some subjects I have 1 day of
>>> monitoring,
>>> and for some I have 2 days, some I have 3, etc. My dependent variable of
>>> interest is daily average activity levels, but I would like this to be
>>> weighted by the number of days monitored. (This is important because
>>> there
>>> seems to be a clear relationship between days monitored and age, race,
>>> etc).
>>>
>>> How do I incorporate this additional level of weighting? For instance,
>>> if I use
>>>
>>>  svy : mean depvar [aw=days]
>>>
>>> I get an error that weights are not reported.
>>>
>>> thanks,
>>> Jeph
>>> *
>>> *   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/
>

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