1
$\begingroup$

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?

$\endgroup$
3
  • $\begingroup$ Could you provide some r code to generate a fake dataset, such that I can verify my idea about this question? $\endgroup$
    – user158565
    Commented Dec 15, 2018 at 21:27
  • $\begingroup$ @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) $\endgroup$ Commented Dec 15, 2018 at 21:38
  • $\begingroup$ Sorry, I cannot figure out what 'correlation means in lme. $\endgroup$
    – user158565
    Commented Dec 15, 2018 at 22:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.