0
我試圖運行使用lme4庫的anova模型。我沒有任何實際的數據,所以我只是從MASS中抽出了Cars93的數據。雖然我可以讓lmer(...)工作,但我似乎無法打印出anova表格。在lmer模型上運行時,anova輸出空白
這裏發生了什麼:
> library(MASS)
> cars <- Cars93
> library(lme4)
Loading required package: Matrix
Loading required package: lattice
Attaching package: ‘lme4’
The following object(s) are masked from ‘package:stats’:
AIC, BIC
> fit <- lmer(Max.Price ~ 1+(1|AirBags)+(1|Man.trans.avail), data=cars)
> anova(fit)
Analysis of Variance Table
Df Sum Sq Mean Sq F value
> summary(fit)
Linear mixed model fit by REML
Formula: Max.Price ~ 1 + (1 | AirBags) + (1 | Man.trans.avail)
Data: cars
AIC BIC logLik deviance REMLdev
688 698.1 -340 685.1 680
Random effects:
Groups Name Variance Std.Dev.
AirBags (Intercept) 62.2339 7.8888
Man.trans.avail (Intercept) 6.3022 2.5104
Residual 83.2786 9.1257
Number of obs: 93, groups: AirBags, 3; Man.trans.avail, 2
Fixed effects:
Estimate Std. Error t value
(Intercept) 23.81 5.00 4.761
任何幫助或建議,將不勝感激。
'lme4'中的'anova'只測試固定的效果參數......這是一個很長的故事。 – 2013-03-01 15:00:55