[R] Sample or Probability Weights in LM4, NLME (and PLM) package

Thomas Lumley tlumley at uw.edu
Thu Mar 10 23:58:23 CET 2011


On Fri, Mar 11, 2011 at 11:07 AM, Arne Jonas Warnke
<arne.warnke at googlemail.com> wrote:
> Dear all,
>
>
>
> First, I would like to thank you for your immense work. My question is
> about a frequent topic which I am not able to solve - even after hours
> of search in the mailing lisy.
>
> I would like to analyse random-effects (and fixed-effects)models of
> longitudinal / panel data with sampling weights. I have an unbalanced
> panel of different individuals in 5 years and income data as well as
> their age and I would like to analyse age-earnings profiles with
> longitudinal data to controll for cohort effects.

This is doable in theory, since the random effects structure is nested
in the sampling design, but not in any R package I am aware of.  The
problem is that you can't just put in one set of weights -- in order
to get the variance components correct, you need to put in separate
weights for each level of sampling and random effect.  So whatever
lme() does can't be correct for sampling weights, since it allows for
only one set of weights

<snip>
> Are you aware of any other packages in R which provide the opportunity
> to examine longitudinal data with sample weights?

If you aren't specifically interested in estimating the variance
components, just in using longitudinal data to estimate the
regression, you can just use design-based inference for a linear
regression model, with svyglm() in the 'survey' package.

If you want estimates of the variance components you may be out of luck.

    -thomas

-- 
Thomas Lumley
Professor of Biostatistics
University of Auckland



More information about the R-help mailing list