predict.Arima
位於 stats
包(package)。 說明
根據 arima
擬合的模型進行預測。
用法
## S3 method for class 'Arima'
predict(object, n.ahead = 1, newxreg = NULL,
se.fit = TRUE, ...)
參數
object |
|
n.ahead |
需要預測的前方步數。 |
newxreg |
用於預測的 |
se.fit |
邏輯:是否應該返回預測的標準誤差? |
... |
傳遞給其他方法或從其他方法傳遞的參數。 |
細節
通過 KalmanForecast
使用 Finite-history 預測。僅當擬合的 MA 部分可逆時,這才在統計上有效,因此 predict.Arima
將為不可逆 MA 模型發出警告。
預測的標準誤差排除了 ARMA 模型和回歸係數估計的不確定性。根據 Harvey(1993,第 58-9 頁)的說法,影響很小。
值
預測的時間序列,或者如果 se.fit = TRUE
,則包含組件 pred
的列表(預測)和 se
估計的標準誤差。兩個組成部分都是時間序列。
例子
od <- options(digits = 5) # avoid too much spurious accuracy
predict(arima(lh, order = c(3,0,0)), n.ahead = 12)
(fit <- arima(USAccDeaths, order = c(0,1,1),
seasonal = list(order = c(0,1,1))))
predict(fit, n.ahead = 6)
options(od)
參考
Durbin, J. and Koopman, S. J. (2001). Time Series Analysis by State Space Methods. Oxford University Press.
Harvey, A. C. and McKenzie, C. R. (1982). Algorithm AS 182: An algorithm for finite sample prediction from ARIMA processes. Applied Statistics, 31, 180-187. doi:10.2307/2347987.
Harvey, A. C. (1993). Time Series Models, 2nd Edition. Harvester Wheatsheaf. Sections 3.3 and 4.4.
也可以看看
相關用法
- R predict.smooth.spline 通過平滑樣條擬合進行預測
- R predict.HoltWinters 擬合 Holt-Winters 模型的預測函數
- R predict.loess 預測黃土曲線或表麵
- R predict.lm 線性模型擬合的預測方法
- R predict.nls 根據非線性最小二乘擬合進行預測
- R predict.glm GLM 擬合的預測方法
- R predict 模型預測
- R preplot 繪圖對象的預計算
- R profile.nls 分析 nls 對象的方法
- R proj 模型預測
- R prcomp 主成分分析
- R printCoefmat 打印係數矩陣
- R profile 分析模型的通用函數
- R prop.test 等比例或給定比例檢驗
- R profile.glm 分析 glm 對象的方法
- R print.ts 時間序列對象的打印和格式化
- R prop.trend.test 檢驗比例趨勢
- R princomp 主成分分析
- R print.power.htest 假設檢驗和功效計算對象的打印方法
- R plot.stepfun 繪製階躍函數
- R pairwise.t.test 成對 t 檢驗
- R plot.profile.nls 繪製 profile.nls 對象
- R plot.isoreg isoreg 對象的繪圖方法
- R plot.HoltWinters HoltWinters 對象的繪圖函數
- R ppoints 概率圖的坐標
注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 Forecast from ARIMA fits。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。