On Fri, 23 Jul 2004, Tobias Verbeke wrote:

> I guess the most common way of proceeding is to first stratify,
> and then to sample clusters independently within each stratum.
> If this is the case, your data file can be put together like
>
> stratum               psu     ...
> 1             1
> 1             2
> 1             3
> 2             1
> 2             2
> 2             3
>
> or like
>
> stratum               psu     ...
> 1             1
> 1             2
> 1             3
> 2             4
> 2             5
> 2             6
>
> svydesign only likes the first data structure so

This is exactly backwards. svydesign by default assumes the *second* data
structure.


>
> meps.design <- svydesign(ids = ~varpsu01, strata = ~varstr01,
>       weights = ~perwt01f, nest = TRUE, data = h60)
>
> should work. See ?svydesign.

This fix is correct, even if the rationale is backwards.

        -thomas

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to