# Confidence interval of parameters of mixed-model in R

#### Cynderella

##### New Member
Hi , can anyone please explain me the following output produces in R when I ran the command confint(lmer()) .

Here is the R code :
Code:
    library(lme4)
fm1 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
confint(fm1)
And the output is :
Code:
    Computing profile confidence intervals ...
2.5 %     97.5 %
.sig01       14.3815760  37.715996
.sig02       -0.4815007   0.684986
.sig03        3.8011641   8.753383
.sigma       22.8982669  28.857997
(Intercept) 237.6806955 265.129515
Days          7.3586533  13.575919
I have understood the last two row which are confidence interval for Intercept and Days , respectively . But what are those sig01 , sig02 , sig03 , sigma ?

If I write down the model Reaction ~ Days + (Days | Subject) :

$$\text{Reaction}_{ij}=\beta_{0j}+\beta_{1j}\text{Days}_{ij}+e_{ij}$$
$$\beta_{0j}=\gamma_{00}+u_{0j}$$
$$\beta_{1j}=\gamma_{10}+u_{1j}$$

Combining the last two equations into first one , that is , by substituting the level-2 equation to level-1 equation, we have ;

$$\text{Reaction}_{ij}=\gamma_{00}+\gamma_{10}\text{Days}_{ij}+u_{0j}+u_{1j}\text{Days}_{ij}+e_{ij}$$

* Is sig01 variance of $$u_{0j}$$ ?

* Is sig02 variance of $$u_{1j}$$ ?

* Is sig03 variance of $$e_{ij}$$ ?

* What is sigma in the output of confint ?

Many Thanks! Regards .

Last edited:

#### TheEcologist

##### Global Moderator
Yes, it's not very intuitively named. But If you conduct

Code:
confint.merMod(fm1,oldNames=FALSE)
You'll see that the output makes more sense, as the first three parameter simply refer to estimates of the variances for each random effect and their correlation/covariance. The forth gives confidence intervals for the residual variance.

Code:
                                   2.5 %     97.5 %
sd_(Intercept)|Subject        14.3814761  37.715996
cor_Days.(Intercept)|Subject  -0.4815007   0.684986
sd_Days|Subject                3.8011641   8.753383
sigma                         22.8982669  28.857997
(Intercept)                  237.6806955 265.129515
Days                           7.3586533  13.575919
Good luck,

#### Cynderella

##### New Member
I have not understood the second one . What is
Code:
                                   2.5 %     97.5 %
cor_Days.(Intercept)|Subject  -0.4815007   0.684986
?

What does "cor_Days.(Intercept)|Subject" mean ?

Thanks again . Regards .

#### TheEcologist

##### Global Moderator
the variances for each random effect and their correlation/covariance.
It's the correlation between random effects.

#### Cynderella

##### New Member
the first three parameter simply refer to estimates of the variances for each random effect and their correlation/covariance. The forth gives confidence intervals for the residual variance.
.

Are the first four gives confidence interval of **Variance** or confidence interval of **Standard Deviation** ?
From your Quote , it seems confidence interval of **Variance** . But if I tried empirically it matches with confidence interval of **Standard Deviation** .

Code:
library(lme4)
model <- lmer(Reaction ~ Days + (1|Subject), sleepstudy)
confint.merMod(model,oldName=FALSE)

s2 <- VarCorr(model)$Subject[1] n <- nrow(ranef(model)$Subject)
CI <- (n - 1) * s2 / qchisq(c(0.975, 0.025), df = n - 1)
sqrt(CI) #matches with first row of confint
Would you please tell me am I doing any mistake ?

Thanks & Regards .