我需要得到係數以及它們的SE,來自gls的t值和p值在R中輸出。從R中輸出的所有信息中提取係數R
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
我非常感謝,如果有人幫我弄清楚這一點。提前致謝。
讓他們到哪裏?他們在摘要中顯示,你想輸出這個,還是將它們用作另一個函數的輸入?這個問題現在還不清楚。 – richiemorrisroe
@richiemorrisroe:我只是希望他們從這個摘要中提取並且想要在sweave文件中使用。 – MYaseen208