2013-02-13 82 views
2

我使用的lmList包从nlme包中运行基于不同组的功能的各种回归。我有点困惑关于汇总结果给我看到summary.lmList为什么我会得到lmList vs lmList的不同总结结果[[x]]

The `summary.lm` method is applied to each lm component of object to produce 
summary information on the individual fits, which is organized into a list of 
summary statistics. 

The returned object is suitable for printing with the print.summary.lmList 
method. 

的解释我的意思是低于

set.seed(123) 
t <- data.frame(
     name=sample(c("a","b","c"),size=500,replace=T), 
     x=1:500, 
     y=1:500+rnorm(100) 
    ) 
ta <- t[t$name=="a",] 
lma <- lm(y~x,ta) 
lmL <- lmList(y~x | name,t) 
r1 <- summary(lmL) 
r2 <- summary(lmL[["a"]]) 
r3 <- summary(lma) 

可有人请向我解释为什么显示“一个值“r1与r2和r3不匹配,而r2与r3匹配?

回答

5

lmList的版本和它的摘要方法在NLME具有一个参数pool

指示是否 残余标准误差的汇总估计应在标准 计算中使用的可选逻辑值摘要的偏差或标准误差。

我猜如果你设置为FALSE当你拨打summary你会得到相同的值。

+0

做到了这一点。谢谢! – JPC 2013-02-13 03:33:48

+0

忘记接受这个,我的坏! – JPC 2014-07-15 22:54:47

相关问题