[R-sig-ME] random effect model

li li hannah.hlx at gmail.com
Fri Dec 11 04:16:36 CET 2015


Hi all,
  I have a very simple data set "data". Here both day and analysts are
considered as random.
I fit the mod1 and mod2 as below. The random effect in both models come out
to be zero and same results are returned from both models. It seems very
strange to me. Anyone have an explanation or suggestion?
  Thanks. Hanna



> data
               values day analyst
stat_d1p1 -0.06357455   1       1
stat_d1p2 -0.05564684   1       2
stat_d1p3  0.16145903   1       3
stat_d2p1  0.07763253   2       1
stat_d2p2 -0.02988389   2       2
stat_d2p3 -0.16899311   2       3
stat_d3p1 -0.13545138   3       1
stat_d3p2 -0.07537850   3       2
stat_d3p3 -0.01313345   3       3
> library(lme4)
> library(lmerTest)

> mod1 <- lmer(values ~ 1+(1|day),data=data)
> summary(mod1)
Linear mixed model fit by REML t-tests use Satterthwaite approximations to
  degrees of freedom [lmerMod]
Formula: values ~ 1 + (1 | day)
   Data: data
REML criterion at convergence: -11.7
Scaled residuals:
    Min      1Q  Median      3Q     Max
-1.3311 -0.4103 -0.2162  0.2019  1.9192
Random effects:
 Groups   Name        Variance Std.Dev.
 day      (Intercept) 0.00000  0.0000
 Residual             0.01034  0.1017
Number of obs: 9, groups:  day, 3
Fixed effects:
            Estimate Std. Error       df t value Pr(>|t|)
(Intercept) -0.03366    0.03389  8.00000  -0.993     0.35
>

> mod2 <- lmer(values ~ 1+(1|analyst),data=data)
> summary(mod2)
Linear mixed model fit by REML t-tests use Satterthwaite approximations to
  degrees of freedom [lmerMod]
Formula: values ~ 1 + (1 | analyst)
   Data: data
REML criterion at convergence: -11.7
Scaled residuals:
    Min      1Q  Median      3Q     Max
-1.3311 -0.4103 -0.2162  0.2019  1.9192
Random effects:
 Groups   Name        Variance Std.Dev.
 analyst  (Intercept) 0.00000  0.0000
 Residual             0.01034  0.1017
Number of obs: 9, groups:  analyst, 3
Fixed effects:
            Estimate Std. Error       df t value Pr(>|t|)
(Intercept) -0.03366    0.03389  8.00000  -0.993     0.35
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list