[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 03:44:52 CET 2020


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]]



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