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匹配?
做到了這一點。謝謝! – JPC 2013-02-13 03:33:48
忘記接受這個,我的壞! – JPC 2014-07-15 22:54:47