Arima(forecast)
Arima()所属R语言包:forecast
Fit ARIMA model to univariate time series
适合单变量时间序列的ARIMA模型
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Largely a wrapper for the arima function in the stats package. The main difference is that this function allows a drift term. It is also possible to take an ARIMA model from a previous call to Arima and re-apply it to the data x.
主要是包装的arima统计软件包的功能。主要的区别是,此函数允许漂移项。它也可以从以前的调用ArimaARIMA模型,并重新申请的数据x。
用法----------Usage----------
Arima(x, order=c(0,0,0), seasonal=list(order=c(0,0,0), period=NA),
xreg=NULL, include.mean=TRUE, include.drift=FALSE,
include.constant, lambda=model$lambda, transform.pars=TRUE,
fixed=NULL, init=NULL, method=c("CSS-ML","ML","CSS"), n.cond,
optim.control=list(), kappa=1e6, model=NULL)
参数----------Arguments----------
参数:x
a univariate time series
一个单变量时间序列
参数:order
A specification of the non-seasonal part of the ARIMA model: the three components (p, d, q) are the AR order, the degree of differencing, and the MA order.
一个规范的非季节性的ARIMA模型的三个组成部分(P,D,Q)的AR顺序,程度的差异,以及MA秩序的一部分。
参数:seasonal
A specification of the seasonal part of the ARIMA model, plus the period (which defaults to frequency(x)). This should be a list with components order and period, but a specification of just a numeric vector of length 3 will be turned into a suitable list with the specification as the order.
季节性的ARIMA模型,再加上时间(默认频率(X))的规格。这应该是一个列表组件的顺序和期限,但会变成一个合适的列表只是一个数字矢量的长度为3的规范与规范的顺序。
参数:xreg
Optionally, a vector or matrix of external regressors, which must have the same number of rows as x.
任选地,向量或外部回归量矩阵,其中必须有相同的行数为x。
参数:include.mean
Should the ARIMA model include a mean term? The default is TRUE for undifferenced series, FALSE for differenced ones (where a mean would not affect the fit nor predictions).
ARIMA模型应该包括平均期限吗?非差系列的默认值是TRUE,FALSE为差的(平均不会影响的适合也预测)。
参数:include.drift
Should the ARIMA model include a linear drift term? (i.e., a linear regression with ARIMA errors is fitted.) The default is FALSE.
如果ARIMA模型包括一个线性漂移项? (即一元线性回归与ARIMA错误的安装)。默认值是FALSE。
参数:include.constant
If TRUE, then include.mean is set to be TRUE for undifferenced series and include.drift is set to be TRUE for differenced series. Note that if there is more than one difference taken, no constant is included regardless of the value of this argument. This is deliberate as otherwise quadratic and higher order polynomial trends would be induced.
如果是TRUE,那么include.mean设置为TRUE非差系列include.drift设置为TRUE差分系列。需要注意的是,如果有超过一个区别采取的,没有固定的不管这种说法的价值。这是故意的,否则会诱发二次和高阶多项式趋势。
参数:lambda
Box-Cox transformation parameter. Ignored if NULL. Otherwise, data transformed before model is estimated.
Box-Cox转换参数。如果忽略NULL。否则,数据前先转换模型的估计。
参数:transform.pars
Logical. If true, the AR parameters are transformed to ensure that they remain in the region of stationarity. Not used for method="CSS".
逻辑。如果为true,AR参数的改革,以确保它们保持在该区域的平稳性。未使用的方法=“CSS”。
参数:fixed
optional numeric vector of the same length as the total number of parameters. If supplied, only NA entries in fixed will be varied. transform.pars=TRUE will be overridden (with a warning) if any AR parameters are fixed. It may be wise to set transform.pars=FALSE when fixing MA parameters, especially near non-invertibility.
可选的数字参数的总数相同的长度的矢量。如果提供,仅NA在固定的条目将被改变。 transform.pars = TRUE将被覆盖(警告),如果任何AR参数是固定的。这可能是明智的transform.pars = FALSE时,固定MA参数,尤其是靠近非可逆性。
参数:init
optional numeric vector of initial parameter values. Missing values will be filled in, by zeroes except for regression coefficients. Values already specified in fixed will be ignored.
可选的数字矢量的初始参数值。遗漏值将被填充,除了回归系数的零点。已经指定在固定的值将被忽略。
参数:method
Fitting method: maximum likelihood or minimize conditional sum-of-squares. The default (unless there are missing values) is to use conditional-sum-of-squares to find starting values, then maximum likelihood.
拟合方法最大似然或最小化条件的总和的平方。默认情况下(除非有缺失值)的使用条件和平方初始值,那么最大的可能性。
参数:n.cond
Only used if fitting by conditional-sum-of-squares: the number of initial observations to ignore. It will be ignored if less than the maximum lag of an AR term.
仅用于拟合条件和平方数的初步观察忽略。它将被忽略,如果小于一个AR项的最大滞后。
参数:optim.control
List of control parameters for optim.
OPTIM控制参数列表。
参数:kappa
the prior variance (as a multiple of the innovations variance) for the past observations in a differenced model. Do not reduce this.
先验方差(作为的创新的方差的倍数)在差分模式的过去的观测。不降低。
参数:model
Output from a previous call to Arima. If model is passed, this same model is fitted to x without re-estimating any parameters.
从以前的调用Arima输出。如果传递模型,这个模型安装到x没有重新估算任何参数。
Details
详细信息----------Details----------
See the arima function in the stats package.
请参阅arima统计软件包的功能。
值----------Value----------
See the arima function in the stats package. The additional objects returned are
请参阅arima统计软件包的功能。返回的对象是
参数:x
The time series data
的时间序列数据
参数:xreg
The regressors used in fitting (when relevant).
在装修中使用的回归量(相关时)。
(作者)----------Author(s)----------
Rob J Hyndman
参见----------See Also----------
arima
arima
实例----------Examples----------
plot(forecast(fit,h=20))
# Fit model to first few years of AirPassengers data[前几年的AirPassengers数据的拟合模型]
air.model <- Arima(window(AirPassengers,end=1956+11/12),order=c(0,1,1),
seasonal=list(order=c(0,1,1),period=12),lambda=0)
plot(forecast(air.model,h=48))
lines(AirPassengers)
# Apply fitted model to later data[以后的数据拟合模型]
air.model2 <- Arima(window(AirPassengers,start=1957),model=air.model)
# Forecast accuracy measures on the log scale.[预测准确度测量的log规模。]
# in-sample one-step forecasts.[在样品1步预测。]
accuracy(air.model)
# out-of-sample one-step forecasts.[样本1步预测。]
accuracy(air.model2)
# out-of-sample multi-step forecasts[样本多步预测]
accuracy(forecast(air.model,h=48,lambda=NULL),
log(window(AirPassengers,start=1957)))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|