找回密码
 注册
查看: 8880|回复: 0

R语言:ar()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-2-16 17:39:15 | 显示全部楼层 |阅读模式
ar(stats)
ar()所属R语言包:stats

                                        Fit Autoregressive Models to Time Series
                                         适合自回归模型的时间序列

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

Fit an autoregressive time series model to the data, by default selecting the complexity by AIC.
适合自回归时间系列数据模型,默认选择由AIC的复杂性。


用法----------Usage----------


ar(x, aic = TRUE, order.max = NULL,
   method=c("yule-walker", "burg", "ols", "mle", "yw"),
   na.action, series, ...)

ar.burg(x, ...)
## Default S3 method:[默认方法]
ar.burg(x, aic = TRUE, order.max = NULL,
        na.action = na.fail, demean = TRUE, series,
        var.method = 1, ...)
## S3 method for class 'mts'
ar.burg(x, aic = TRUE, order.max = NULL,
        na.action = na.fail, demean = TRUE, series,
        var.method = 1, ...)

ar.yw(x, ...)
## Default S3 method:[默认方法]
ar.yw(x, aic = TRUE, order.max = NULL,
      na.action = na.fail, demean = TRUE, series, ...)
## S3 method for class 'mts'
ar.yw(x, aic = TRUE, order.max = NULL,
      na.action = na.fail, demean = TRUE, series,
      var.method = 1, ...)

ar.mle(x, aic = TRUE, order.max = NULL, na.action = na.fail,
       demean = TRUE, series, ...)

## S3 method for class 'ar'
predict(object, newdata, n.ahead = 1, se.fit = TRUE, ...)



参数----------Arguments----------

参数:x
A univariate or multivariate time series.
一元或多元时间序列。


参数:aic
Logical flag.  If TRUE then the Akaike Information Criterion is used to choose the order of the autoregressive model. If FALSE, the model of order order.max is fitted.
逻辑标志。如果TRUE然后用于赤池信息准则选择自回归模型的顺序。如果FALSE,为了order.max模型安装。


参数:order.max
Maximum order (or order) of model to fit. Defaults to the smaller of N-1 and 10*log10(N) where N is the number of observations except for method="mle" where it is the minimum of this quantity and 12.
以适应模型的最大订单(或订单)。默认较小N-1和10*log10(N)其中N是除了method="mle"观测它至少是这个数量和12。


参数:method
Character string giving the method used to fit the model.  Must be one of the strings in the default argument (the first few characters are sufficient).  Defaults to "yule-walker".
字符串提供的方法来拟合模型。必须在默认参数的字符串(前几个字符就足够了)。 "yule-walker"默认。


参数:na.action
function to be called to handle missing values.
函数被调用来处理缺失值。


参数:demean
should a mean be estimated during fitting?
应该意味着在装修过程中估计?


参数:series
names for the series.  Defaults to deparse(substitute(x)).
系列名称。 deparse(substitute(x))默认。


参数:var.method
the method to estimate the innovations variance (see "Details").
创新方差估计的方法(见“详细资料”)。


参数:...
additional arguments for specific methods.
具体方法为额外的参数。


参数:object
a fit from ar.
从ar适合。


参数:newdata
data to which to apply the prediction.
的数据应用的预测。


参数:n.ahead
number of steps ahead at which to predict.
步骤提前预测数。


参数:se.fit
logical: return estimated standard errors of the prediction error?
逻辑:返回的预报误差的估计标准误差?


Details

详情----------Details----------

For definiteness, note that the AR coefficients have the sign in
定性,请注意,AR系数标志

ar is just a wrapper for the functions ar.yw, ar.burg, ar.ols and ar.mle.
ar仅仅是一个功能包装ar.yw,ar.burg,ar.ols和ar.mle。

Order selection is done by AIC if aic is true. This is problematic, as of the methods here only ar.mle performs true maximum likelihood estimation. The AIC is computed as if the variance estimate were the MLE, omitting the determinant term from the likelihood. Note that this is not the same as the Gaussian likelihood evaluated at the estimated parameter values. In ar.yw the variance matrix of the innovations is computed from the fitted coefficients and the autocovariance of x.
为了选择是由AIC aic如果是真实的。这是有问题的,作为唯一的方法,在这里ar.mle执行真正的最大似然估计。 AIC的计算,如果方差估计MLE的,行列式长期忽略的可能性。请注意,这不是为高斯的可能性进行评估估计的参数值相同。在ar.yw创新方差矩阵拟合系数计算的自协x。

ar.burg allows two methods to estimate the innovations variance and hence AIC. Method 1 is to use the update given by the Levinson-Durbin recursion (Brockwell and Davis, 1991, (8.2.6) on page 242), and follows S-PLUS. Method 2 is the mean of the sum of squares of the forward and backward prediction errors (as in Brockwell and Davis, 1996, page 145). Percival and Walden (1998) discuss both. In the multivariate case the estimated coefficients will depend (slightly) on the variance estimation method.
ar.burg允许两种方法估算的创新变异,因此AIC的。方法1是用莱文森 - 德宾递归(Brockwell和戴维斯,1991年,(8.2.6)第242页)的更新,如下,S-PLUS。方法2是向前和向后的预测误差(如在Brockwell和戴维斯,1996年,第145页)的平方的总和的平均值。波斯富街和Walden(1998)讨论。在多元的情况下,估计系数将取决于方差估计方法(略)。

Remember that ar includes by default a constant in the model, by removing the overall mean of x before fitting the AR model, or (ar.mle) estimating a constant to subtract.
记得ar包括默认情况下,模型中的常数,消除整体平均x装修前的AR模型,或(ar.mle)估计一个常数减去。


值----------Value----------

For ar and its methods a list of class "ar" with the following elements:
ar和方法的一类名单"ar"以下内容:


参数:order
The order of the fitted model.  This is chosen by minimizing the AIC if aic=TRUE, otherwise it is order.max.
为了拟合模型。这是选择通过最大限度地减少了AIC如果aic=TRUE,否则它是order.max。


参数:ar
Estimated autoregression coefficients for the fitted model.
拟合模型估计的自回归系数。


参数:var.pred
The prediction variance: an estimate of the portion of the variance of the time series that is not explained by the autoregressive model.
预测方差:估计的时间序列,自回归模型的解释方差的部分。


参数:x.mean
The estimated mean of the series used in fitting and for use in prediction.
该系列的估计平均在拟合和预测。


参数:x.intercept
(ar.ols only.) The intercept in the model for x - x.mean.
(ar.ols只。)在x - x.mean模型的截距。


参数:aic
The differences in AIC between each model and the best-fitting model.  Note that the latter can have an AIC of -Inf.
AIC中的每个模型和最佳拟合模型之间的差异。请注意,后者可以有一个-InfAIC的。


参数:n.used
The number of observations in the time series.
在时间序列观测。


参数:order.max
The value of the order.max argument.
order.max参数值。


参数:partialacf
The estimate of the partial autocorrelation function up to lag order.max.
偏自相关函数的估计落后order.max。


参数:resid
residuals from the fitted model, conditioning on the first order observations. The first order residuals are set to NA. If x is a time series, so is resid.
从拟合模型,空调第一order观测残差。第一order残差设置NA的。 x如果是一个时间系列,所以是resid。


参数:method
The value of the method argument.
method参数值。


参数:series
The name(s) of the time series.
时间序列的名称(S)。


参数:frequency
The frequency of the time series.
时间序列的频率。


参数:call
The matched call.
匹配的呼叫。


参数:asy.var.coef
(univariate case, order > 0.) The asymptotic-theory variance matrix of the coefficient estimates.
(单因素的情况下,order > 0。)系数估计的渐近理论方差矩阵。

For predict.ar, a time series of predictions, or if se.fit = TRUE, a list with components pred, the predictions, and se, the estimated standard errors. Both components are time series.
对于predict.ar,时间序列的预测,或者如果se.fit = TRUE,一个组件的列表pred,预测,se,估计标准误差。这两个组件是时间序列。


注意----------Note----------

Only the univariate case of ar.mle is implemented.
唯一的的ar.mle单变量情况实施。

Fitting by method="mle" to long series can be very slow.
装修method="mle"长的系列,可能会非常缓慢。


作者(S)----------Author(s)----------



Martyn Plummer. Univariate case of <code>ar.yw</code>, <code>ar.mle</code>
and C code for univariate case of <code>ar.burg</code> by B. D. Ripley.




参考文献----------References----------

Series and Forecasting Methods.  Second edition. Springer, New York. Section 11.4.
Series and Forecasting. Springer, New York. Sections 5.1 and 7.6.
for Physical Applications. Cambridge University Press.
and the approximate canonical factorization of a spectral density matrix. Biometrika 40, 129&ndash;134.

参见----------See Also----------

ar.ols, arima for ARMA models; acf2AR, for AR construction from the ACF.
ar.ols,arimaARMA模型;acf2AR,AR从ACF建设。

arima.sim for simulation of AR processes.
arima.sim的AR过程的模拟。


举例----------Examples----------


ar(lh)
ar(lh, method="burg")
ar(lh, method="ols")
ar(lh, FALSE, 4) # fit ar(4)[适合AR(4)]

(sunspot.ar <- ar(sunspot.year))
predict(sunspot.ar, n.ahead=25)
## try the other methods too[#尝试其他方法]

ar(ts.union(BJsales, BJsales.lead))
## Burg is quite different here, as is OLS (see ar.ols)[#伯格是相当不同的,在这里,为的是母机(见ar.ols)]
ar(ts.union(BJsales, BJsales.lead), method="burg")

转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。


注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2025-2-2 18:47 , Processed in 0.020747 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表