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 on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: svy + aweights

From   Stas Kolenikov <>
Subject   Re: st: svy + aweights
Date   Thu, 10 Nov 2011 13:58:48 -0500

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

Stas Kolenikov, also found at
Small print: I use this email account for mailing lists only.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index