我正在逐步回归:step(lm(y~x1+x2+x3+x4+x5))。我该如何提取带有这些系数的名称的系数的最终值?(我必须通过循环执行此操作,因为我有300次回归)。当我使用时$coefficients,我得到所有的回归,而不仅仅是最终回归。
step(lm(y~x1+x2+x3+x4+x5))
$coefficients
statistics regression r
r ×1
regression ×1
statistics ×1