[R] Case weights in nlme models

Andrew Perrin andrew_perrin at unc.edu
Tue Mar 12 16:10:37 CET 2002


Greetings-

I am in the process of constructing a nonlinear model using nlme. The
model is attempting to fit a nested data structure from some
public-opinion data (the data are from individuals nested within
organizations).

The question I have is fairly simple (I hope). The data were collected in
two stages: a 15,000-subject randomly-sampled telephone interview (the
SCREEN), with 2,517 subjects selected for in-home interviews. The
2,517-subject survey constitutes the actual dataset we're using. But those
data include oversamples for activists and african-americans, plus a case
weighting variable. According to the survey's documentation, using the
weight allows the oversampled study data to be representative of the
15,000-person random sample.

All this is fine, and I've been able to run linear models on the data
using lm() with the weights = WT2517 option (WT2517 is the column
containing the weight variable). But the documentation for nlme() suggests
that weights= takes something other than a straight vector:

 weights: an optional `varFunc' object or one-sided formula describing
          the within-group heteroscedasticity structure. If given as a
          formula, it is used as the argument to `varFixed',
          corresponding to fixed variance weights. See the
          documentation on `varClasses' for a description of the
          available `varFunc' classes. Defaults to `NULL',
          corresponding to homoscesdatic within-group errors.

Is it possible to use case weights in an nlme model (both in general and
in the specific R implementation)? If so, could some kind soul point me in
the right direction?

Many thanks.

----------------------------------------------------------------------
Andrew J Perrin - andrew_perrin at unc.edu - http://www.unc.edu/~aperrin
 Assistant Professor of Sociology, U of North Carolina, Chapel Hill
      269 Hamilton Hall, CB#3210, Chapel Hill, NC 27599-3210 USA


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list