2
A
回答
5
請參閱summary
,它將爲大多數類別的迴歸對象生成摘要。
例如,來自help(glm)
:
> clotting <- data.frame(
+ u = c(5,10,15,20,30,40,60,80,100),
+ lot1 = c(118,58,42,35,27,25,21,19,18),
+ lot2 = c(69,35,26,21,18,16,13,12,12))
> summary(glm(lot1 ~ log(u), data = clotting, family = Gamma))
Call:
glm(formula = lot1 ~ log(u), family = Gamma, data = clotting)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.04008 -0.03756 -0.02637 0.02905 0.08641
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.0165544 0.0009275 -17.85 4.28e-07 ***
log(u) 0.0153431 0.0004150 36.98 2.75e-09 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for Gamma family taken to be 0.002446059)
Null deviance: 3.51283 on 8 degrees of freedom
Residual deviance: 0.01673 on 7 degrees of freedom
AIC: 37.99
Number of Fisher Scoring iterations: 3
的R超過GUI程序大贏通常是從功能的輸出是可用的。所以你可以這樣做:
> s = summary(glm(lot1 ~ log(u), data = clotting, family = Gamma))
> s$coefficients[1,]
Estimate Std. Error t value Pr(>|t|)
-1.655438e-02 9.275466e-04 -1.784749e+01 4.279149e-07
> s$cov.scaled
(Intercept) log(u)
(Intercept) 8.603427e-07 -3.606457e-07
log(u) -3.606457e-07 1.721915e-07
爲了得到t和p以及所有參數或縮放的協方差矩陣。但總是閱讀總結方法的文檔,以確保你得到你認爲你得到的東西。有時候返回對象中的東西可能會在轉換後的尺度上計算出來,並在打印對象時顯示在未轉換的比例尺上。
不過請注意,你似乎什麼都表示作爲一個例子是一個ARIMA模型,而且也沒有很好summary
功能arima
對象R:
> m = arima(lh, order = c(1,0,1))
> summary(m)
Length Class Mode
coef 3 -none- numeric
sigma2 1 -none- numeric
var.coef 9 -none- numeric
mask 3 -none- logical
loglik 1 -none- numeric
aic 1 -none- numeric
arma 7 -none- numeric
residuals 48 ts numeric
call 3 -none- call
series 1 -none- character
code 1 -none- numeric
n.cond 1 -none- numeric
model 10 -none- list
這只是一個列表對象的默認彙總與那些元素。只需打印它可以得到幾件事:
> m
Call:
arima(x = lh, order = c(1, 0, 1))
Coefficients:
ar1 ma1 intercept
0.4522 0.1982 2.4101
s.e. 0.1769 0.1705 0.1358
sigma^2 estimated as 0.1923: log likelihood = -28.76, aic = 65.52
3
相關問題
- 1. R base vs plyr迴歸輸出
- 2. 使用Marquardt算法的非線性最小二乘AR(1):EViews vs R
- 3. 迴歸表R
- 4. 馬爾可夫交換 - 自迴歸R
- 5. R線性迴歸
- 6. R矩陣迴歸
- 7. R中的邏輯迴歸
- 8. RandomResorest R中的迴歸
- 9. R迴歸循環
- 10. R邏輯迴歸
- 11. - [R ^符號迴歸
- 12. 線性迴歸與R中
- 13. R中的循環迴歸
- 14. R中的迴歸總結
- 15. R - Logarthmic的迴歸分析
- 16. R中的三角迴歸
- 17. R中的指數迴歸
- 18. R中迴歸的SVM
- 19. 的R - 多變量回歸
- 20. R中的立方迴歸
- 21. Retesting vs迴歸測試
- 22. R的Cox迴歸中的「精確」關係的分割錯誤
- 23. Logistic迴歸雙循環R
- 24. 使用的LM迴歸偏移 - R的
- 25. 迴歸常數
- 26. R中有截距的迴歸模型的斜線不正確
- 27. R不繪製迴歸線
- 28. 套袋logistic迴歸r
- 29. 迴歸與R中XTS
- 30. 迴歸R預測功能
非常感謝詳細的解釋:)! – dreamer
該圖片實際上只是我從網上獲得的一個示例截圖。我並不一定需要arima模型的摘要,但感謝增加:)! – dreamer
如果你曾經這麼做過,'forecast'包定義了arima模型的彙總函數 - 沒有t-statistcs或Probs儘管... – Spacedman