比如fm1中选了A.B.C.D四个随机效应,fm2中选了C.D两个随机效应,哪个模型更好?
====================================================================
> summary(fm1)
Linear mixed model fit by REML ['lmerMod']
Formula: Y~ A + B + C + D +
(A | subject) + (B | subject) + (C | subject) +
(D | subject)
Data: mf1
REML criterion at convergence: 8710.4
Scaled residuals:
Min 1Q Median 3Q Max
-5.2627 -0.3258 0.0235 0.4006 3.6527
Random effects:
Groups Name Variance Std.Dev. Corr
subject (Intercept) 2.936e+11 541883.1
A 1.900e+11 435934.0 0.07
subject.1 (Intercept) 5.667e+11 752821.9
B 5.538e+11 744156.6 0.06
subject.2 (Intercept) 5.345e+11 731074.1
C 4.681e+05 684.2 1.00
subject.3 (Intercept) 5.798e+11 761417.5
D 2.228e+08 14924.9 -0.99
Residual 5.129e+11 716180.0
Number of obs: 279, groups: subject, 31
Fixed effects:
Estimate Std. Error t value
(Intercept) 5.898e+07 1.406e+08 0.419
A -5.970e+05 1.187e+06 -0.503
B -2.303e+05 1.805e+06 -0.128
C 8.702e+02 1.336e+02 6.512
D 7.376e+03 3.568e+03 2.067
Correlation of Fixed Effects:
(Intr) A B C
A -0.906
B -0.384 -0.033
C -0.020 0.029 0.015
D 0.085 -0.101 -0.056 -0.185
Warning messages:
1: In abbreviate(rn, minlength = 11) :
abbreviate used with non-ASCII chars
2: In abbreviate(rn, minlength = 6) : abbreviate used with non-ASCII chars
==========================================
> anova(fm1)
Analysis of Variance Table
Df Sum Sq Mean Sq F value
A 1 6.9652e+10 6.9652e+10 0.1358
B 1 1.0588e+09 1.0588e+09 0.0021
C 1 2.5235e+13 2.5235e+13 49.2003
D 1 2.1922e+12 2.1922e+12 4.2739
=============================================
> show(fm1)
Linear mixed model fit by REML ['lmerMod']
Formula: Y~ A + B + C + D +
(A | subject) + (B | subject) + (C | subject) +
(D | subject)
Data: mf1
REML criterion at convergence: 8710.442
Random effects:
Groups Name Std.Dev. Corr
subject (Intercept) 541883.1
A 435934.0 0.07
subject.1 (Intercept) 752821.9
B 744156.6 0.06
subject.2 (Intercept) 731074.1
C 684.2 1.00
subject.3 (Intercept) 761417.5
D 14924.9 -0.99
Residual 716180.0
Number of obs: 279, groups: subject, 31
Fixed Effects:
(Intercept) A B C
58976976.3 -596952.5 -230347.9 870.2
D
7376.5
>
================================================================================
> summary(fm2)
Linear mixed model fit by REML ['lmerMod']
Formula: Y~ A + B + C + D +
(C | subject) + (D | subject)
Data: mf1
REML criterion at convergence: 8647.1
Scaled residuals:
Min 1Q Median 3Q Max
-5.0430 -0.3518 0.0073 0.3548 5.0665
Random effects:
Groups Name Variance Std.Dev. Corr
subject (Intercept) 8.396e+11 916305.5
C 6.560e+05 809.9 1.00
subject.1 (Intercept) 1.613e+12 1270231.5
D 1.396e+06 1181.5 1.00
Residual 7.929e+11 890430.1
Number of obs: 279, groups: subject, 31
Fixed effects:
Estimate Std. Error t value
(Intercept) -1.142e+07 8.264e+06 -1.382
A 8.413e+04 7.866e+04 1.070
B 8.462e+04 1.357e+05 0.624
C 1.043e+03 1.498e+02 6.962
D 3.338e+02 4.524e+02 0.738
Correlation of Fixed Effects:
(Intr) A B C
A -0.826
B -0.296 -0.280
C -0.057 0.064 0.011
D 0.193 -0.402 0.219 -0.013
Warning messages:
1: In abbreviate(rn, minlength = 11) :
abbreviate used with non-ASCII chars
2: In abbreviate(rn, minlength = 6) : abbreviate used with non-ASCII chars
===========================================
> anova(fm2)
Analysis of Variance Table
Df Sum Sq Mean Sq F value
A 1 1.0477e+12 1.0477e+12 1.3214
B 1 1.0976e+11 1.0976e+11 0.1384
C 1 3.8544e+13 3.8544e+13 48.6131
D 1 4.3179e+11 4.3179e+11 0.5446
====================================
> show(fm2)
Linear mixed model fit by REML ['lmerMod']
Formula: Y~ A + B + C + D +
(C | subject) + (D | subject)
Data: mf1
REML criterion at convergence: 8647.139
Random effects:
Groups Name Std.Dev. Corr
subject (Intercept) 916305.5
C 809.9 1.00
subject.1 (Intercept) 1270231.5
D 1181.5 1.00
Residual 890430.1
Number of obs: 279, groups: subject, 31
Fixed Effects:
(Intercept) A B C
-1.142e+07 8.413e+04 8.462e+04 1.043e+03
D
3.338e+02
>