[R] nlme weighted

Dieter Menne dieter.menne at menne-biomed.de
Mon Apr 6 20:17:27 CEST 2009


Mollet, Fabian <Fabian.Mollet <at> wur.nl> writes:

> I'm fitting a non linear model (energy allocation model to individual
> growth data) using your nlme routine. For each individual I have thus a
> number of observations (age and size) to which I fit the nonlinear
> function, with random effects for the individuals on the estimated
> parameters (individual as the grouping factor). The sampling of these
...
> I think what I need is something that multiplies these weights to the
> residual variance. My first hint would be something as it is described
> by the function varIdent or varFixed, but it is not quite clear to me
> what is being done by these (e.g. what is meant by variance covariate
> etc.?).

In most other R regression packages, most notably lm, weights works 
the way you think it should, but the philosophy is different in lme, 
where a function is executed to compute weights, for example to 
handle heteroscedasticity.

I found this strange in the beginning, but as often Douglas Bates has 
a hidden agenda telling his users: don't do that. Don't average first 
and it later, use the raw data instead, and all the weights will be 
correct. And use the liberated parameter for more important things.

Dieter




More information about the R-help mailing list