Skip to content
Prev 15614 / 20628 Next

using lme for cov structures?

Dear Thierry,

Thanks for your help with these models. I wasn't sure how to formulate 
them. At the department of sciology where I work (Radboud University) 
longitudinal data are getting more common bussiness. And very often, 
we'd like to estimate random country or municipality influences for 
repeated measures on the same person. This is not a big problem as long 
as we use growth modelling with random intercept and random time 
influence, but the covariance structure implied by such models is, say, 
limited. Knowing how to specify the cov. structures in R is really 
helpful and broadens prespective.

After fiddling around with all the possibilities, the picture is slowly 
getting clearer here. I was puzzled by the heterogeneous compound 
symmetry structure and how to specify this. With specification:

heteroCS1 <- lme(opp ~ 1,opposites,
     random = ~1|id,
     correlation=corCompSymm(form = ~ wave),
     weights=varIdent(form = ~1|wave), method="REML")

the random person effect is estimated apart from the residuals. On the 
other hand, with:

heteroCS2 <- lme(opp ~ 1,opposites,
     random = ~1|one,
     correlation=corCompSymm(form = ~wave | one/id),
     weights=varIdent(form = ~1|wave), method="REML"))

the random person effect is kept part of the residuals, because it is 
not estimated explicitly. As a result, heteroCS2 gives the same results 
as obtained with the more straightforward gls specification:

hetroCS3 <- gls(opp ~ 1, opposites,
     correlation = corCompSymm(form = ~ wave|id),
     weights = varIdent(form = ~ 1 | wave))

In general, I think I would prefer to have the random person effect as 
part the residual term instead of seperating it from the residual. That 
is, by cutting the random person effect away from the residual, you 
remove the very part that causes correlation between the observations 
over time. The only specification (I could think of) that keeps the 
random person effect IN the residual is heteroCS2. But maybe something 
less artificial can be found....

And the strange thing that remains is: how can lme estimate a random 
effect variance in case of one single group, as in:

strangemodel <- lme(opp ~1, random = ~1|one, opposites)

which produces the summary:

Linear mixed-effects model fit by REML
  Data: opposites
      AIC      BIC    logLik
   1473.5 1482.303 -733.7498

Random effects:
  Formula: ~1 | one
         (Intercept) Residual
StdDev:    10.50729 46.62148

Fixed effects: opp ~ 1
                Value Std.Error  DF  t-value p-value
(Intercept) 204.8143  11.22179 139 18.25148       0


Do you have any thoughts about this strange model's estimate of the 
intercept variance 10.50729?

Best regards, Ben.
On 26-7-2017 22:05, Thierry Onkelinx wrote: