从R中输出的gls中提取所有信息的系数
|
我需要从R中的gls输出中获取系数及其SE,t值和p值。
library(nlme)
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
summary(fm1)
Generalized least squares fit by REML
Model: follicles ~ sin(2 * pi * Time) + cos(2 * pi * Time)
Data: Ovary
AIC BIC logLik
1571.455 1590.056 -780.7273
Correlation Structure: AR(1)
Formula: ~1 | Mare
Parameter estimate(s):
Phi
0.7532079
Coefficients:
Value Std.Error t-value p-value
(Intercept) 12.216398 0.6646437 18.380373 0.0000
sin(2 * pi * Time) -2.774712 0.6450478 -4.301561 0.0000
cos(2 * pi * Time) -0.899605 0.6975383 -1.289685 0.1981
Correlation:
(Intr) s(*p*T
sin(2 * pi * Time) 0.000
cos(2 * pi * Time) -0.294 0.000
Standardized residuals:
Min Q1 Med Q3 Max
-2.41180365 -0.75405234 -0.02923628 0.63156880 3.16247697
Residual standard error: 4.616172
Degrees of freedom: 308 total; 305 residual
如果有人帮助我解决这个问题,我将深表感谢。提前致谢。
没有找到相关结果
已邀请:
2 个回复
济畦刨
孤捷侩
更一般而言,如果在任何R对象上调用
函数,则通常可以(经过反复试验)弄清楚如何提取所需的结果。 编辑:如果您需要它进入一个sweave文件,则在上面的对象上调用xtable,一切都应该很好。