私はlmList
fromnlme
パッケージを使用して、関数ごとに異なるグループに基づいてさまざまな回帰を実行していました。私が見ている説明を考えると、要約結果に関して少し混乱していますsummary.lmList
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の「a」に表示される値がr2とr3の値と一致しないのに、r2の値がr3の値と一致する理由を誰かに説明してもらえますか?