# Mathematical description of covariance matrix

Using the nlme R package, I specified a model of the form

model <- lme(Y ~ time * group, random = ~1|A,
correlation = corGaus(form = ~time|A/B, nugget = TRUE))


How would you mathematically describe the structure of the covariance matrix of this model?

It is probably somewhat related to my general question, but this is more specific and related to R.

I am not sure what it means mathematically, when the random intercepts are different in random and correlation arguments of the lme function. How does this affect the covariance matrix?

• Could you provide some r code to generate a fake dataset, such that I can verify my idea about this question? Commented Dec 15, 2018 at 21:27
• @user158565 Like this? A <- factor(c(rep(1, 8), rep(2, 8), rep(3, 8))); B <- factor(c(rep(1, 4), rep(2, 4), rep(3, 4), rep(4, 4), rep(5, 4), rep(6, 4))); group <- c(rep(1, 4), rep(2, 4), rep(1, 4), rep(2, 4), rep(1, 4), rep(2, 4)); time <- rep(c(1, 2, 7, 14), 6); Y <- rnorm(24, 10, 1); data <- cbind(A, B, group, time, Y) Commented Dec 15, 2018 at 21:38
• Sorry, I cannot figure out what 'correlation means in lme. Commented Dec 15, 2018 at 22:59