更新时间:2023-12-02 13:29:16
使用lm
方法进行summary
:
coef(summary.lm(model))
这将为所有可识别系数提供一个包含 4 列(平均值、标准误差、t 值、p 值)的系数表/矩阵.然后您可以提取标准误差的第二列.
This will give a coefficient table / matrix of 4 columns (mean, standard error, t-value, p-value) for all identifiable coefficients. Then you can extract the 2nd column for standard error.
aov
返回主要类aov"的对象,但次要类lm",因此 summary.aov
和 summary.lm
都适用但给出了不同的东西.当你简单地做summary(model)
时,前者作为S3方法调度的结果被调用.
aov
returns object of primary class "aov" but secondary class "lm", hence both summary.aov
and summary.lm
apply but gives different things. When you simply do summary(model)
, the former is called as the result of S3 method dispatching.