4
$\begingroup$

I want to test the significance of the random slope in my model, i.e. if there is significant individual difference in change. I am using lmer() and confint() in R

The model is:

 model <- lmer(n ~  time +(1+time|id), data = long)

time: 4 time points, values 1,2,3,4. n: continuous dependent variable for neuroticism

summary(model)
Linear mixed model fit by REML. t-tests use Satterthwaite's method [
lmerModLmerTest]
Formula: n ~ time + (1 + time | id)
   Data: long

REML criterion at convergence: -421

Scaled residuals: 
    Min      1Q  Median      3Q     Max 
-3.6702 -0.4900 -0.0058  0.4802  3.4323 

Random effects:
 Groups   Name        Variance   Std.Dev. Corr
 id       (Intercept) 0.14163958 0.376350     
          time        0.00008384 0.009157 0.39
 Residual             0.01127142 0.106167     
Number of obs: 842, groups:  id, 250

Fixed effects:
              Estimate Std. Error         df t value            Pr(>|t|)
(Intercept)   2.185644   0.025323 248.552766  86.312 <0.0000000000000002
time         -0.003233   0.003363 223.303800  -0.961               0.337

(Intercept) ***
time           
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Correlation of Fixed Effects:
     (Intr)
time -0.240

When I extract the confidence intervals, this is the output:

confint(linear.mod.n)
                  2.5 %      97.5 %
.sig01       0.340460916 0.415590685
.sig02      -1.000000000 1.000000000
.sig03       0.000000000 0.026388745
.sigma       0.098924884 0.112977148
(Intercept)  2.135917316 2.235365845
time        -0.009836903 0.003374645

I am trying to figure out which confidence intervals are presented here. .sig01 appears to match the random intercept standard deviations, .sig03 for random slope time, .sigma for random residuals, and (Intercept) and time for the fixed effects. Is this correct? If so, what is .sig02 providing the confidence interval for?

Thank you all in advance!

$\endgroup$
4
$\begingroup$

Try confint(linear.mod.n, oldNames=FALSE) for more useful labels; .sig02 represents the intercept-slope correlation (which is completely undetermined — the confidence intervals span the entire possible range from -1 to 1 ...)

$\endgroup$
1
  • $\begingroup$ perfect, and so simple- thank you!! $\endgroup$ Feb 11 '20 at 18:06
0
$\begingroup$

Welcome to the site, nguyenllp!

With random effects (varying parameters) in mixed models, looking at statistical significance of estimates do not make the same sense that they do with fixed effects (non-varying parameters). Instead, we use likelihood ratio testing of competing models to determine whether the added complexity of an additional random effect provides a better fit to the data.

In your case, imagine that you had estimated this model first, in which you forced the association between time and n to be the same across ids:

model_a <- lmer(n ~ time +(1|id), data = long)

Then you ran your model that relaxed the assumption that the association between time and n was the same for each id, by including a random slope for time:

model <- lmer(n ~ time +(1+time|id), data = long)

To determine whether allowing for this variation provides a better fit to the data, you can run a likelihood ratio test comparing the two models:

anova(model_a, model)

The likelihood ratio test is $\chi^2$-distributed; here the models differ by two degrees of freedom - one for the random slope variance and the other for the slope-intercept covariance. If the $\chi^2$ test is significant, then you reject the null hypothesis that the two models provide equivalent fit. The less parsimonious model with the random slope provides a better fit to your data. This is how you would justify your model choice in a manuscript.

$\endgroup$
3
  • $\begingroup$ this doesn't actually answer the OP's question ... $\endgroup$
    – Ben Bolker
    Feb 11 '20 at 3:41
  • $\begingroup$ Fair enough, Ben. They are trying to determine statistical significance from random effect variances, which is a lost cause. Hopefully this helps them figure out the next step after they identify the confidence intervals using your answer. $\endgroup$
    – Erik Ruzek
    Feb 11 '20 at 12:41
  • $\begingroup$ thank you for the detailed answer! although this was not the direct question, I was also looking for more information about this, so it was helpful for the project. $\endgroup$ Feb 11 '20 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.