[R-sig-ME] nlme: The meaning of residual variance when using a variance structure

Simon Harmel @|m@h@rme| @end|ng |rom gm@||@com
Fri Nov 6 18:31:50 CET 2020


Thanks. You mentioned "varFixed() sets the variance as being the mean",
mean of what?

On the other hand, you mentioned "sigma(model)^2 [residual variance] is the
constant of proportionality for going from a particular observation to the
(residual) variance at that observation".

How does your definition for  "sigma(model)^2"  change for the following
variance structures?

(1) varPower(form= ~x)   ;   (2) varExp(form= ~x)   ;   (3) varConstPower(form=
~x)

Thank you very much,
Simon



On Fri, Nov 6, 2020 at 6:24 AM Phillip Alday <phillip.alday using mpi.nl> wrote:

> Looking at varFix alone, it looks like the variance is proportional to
> the mean.
>
> Looking at the documentation for varFixed (e.g.
>
> https://www.rdocumentation.org/packages/nlme/versions/3.1-150/topics/varFixed
> ),
> varFixed sets the variance as being the mean. Looking at the
> documentation for lme
> (https://www.rdocumentation.org/packages/nlme/versions/3.1-150/topics/lme
> ),
> the weights describe the "within-group heteroskedacity structure", which
> here basically means the observation-level variation after the grouping
> has been taken into account.
>
> So then sigma(model)^2 is the constant of proportionality for going from
> a particular observation to the (residual) variance at that observation.
> Note that only 'part' of an observation is relevant in this example: x
> matters but not month.
>
> Also, I'm guessing that you got this example from somewhere (because it
> uses things beyond your own understanding), so it would be usual
> practice to give credit to the individual(s) who came up with it.
>
> Phillip
>
> On 6/11/20 3:44 am, Simon Harmel wrote:
> > Hello All,
> >
> > My understanding is that a varFixed() variance structure in lme() call,
> > models the residual variance proportional to a numeric variance covariate
> > (e.g., `x`) such that there would be a linear relation between the two.
> >
> > But what is the exact meaning of sigma(fitted_model)^2 alone in a fitted
> > model that has used  varFixed(~x)  in it?
> >
> > Below is a fully reproducible example.
> >
> > library(nlme)
> >
> > dat <- read.csv('
> > https://raw.githubusercontent.com/rnorouzian/e/master/var.csv')
> > dat$month <- factor(dat$month)
> >
> > m2 <- lme(y ~ x * month, random = ~1|id, weights = varFixed(~x), data =
> dat)
> >
> > varFix <- function(x) sigma(m2)^2*x  ## What is the meaning of
> "sigma(m2)^2"
> > here?
> >
> > with(dat, curve(varFix(x), min(x), max(x), lwd = 2))
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-sig-mixed-models using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
> >
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list