Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

estimate

Estimate an ARIMA Model


Description

Estimates an ARIMA model for a univariate time series, including a sparse ARIMA model.

Usage

estimate(x, p = 0, d = 0, q = 0, PDQ = c(0, 0, 0), S = NA,
  method = c("CSS-ML", "ML", "CSS"), intercept = TRUE, output = TRUE, ...)

Arguments

x

a univariate time series.

p

the AR order, can be a positive integer or a vector with several positive integers. The default is 0.

d

the degree of differencing. The default is 0.

q

the MA order, can be a positive integer or a vector with several positive integers. The default is 0.

PDQ

a vector with three non-negative integers for specification of the seasonal part of the ARIMA model. The default is c(0,0,0).

S

the period of seasonal ARIMA model. The default is NA.

method

fitting method. The default is CSS-ML.

intercept

a logical value indicating to include the intercept in ARIMA model. The default is TRUE.

output

a logical value indicating to print the results in R console. The default is TRUE.

...

optional arguments to arima function.

Details

This function is similar to the ESTIMATE statement in ARIMA procedure of SAS, except that it does not fit a transfer function model for a univariate time series. The fitting method is inherited from arima in stats package. To be specific, the pure ARIMA(p,q) is defined as

X[t] = μ + φ[1]*X[t-1] + ... + φ[p]*X[p] + e[t] - θ[1]*e[t-1] - ... - θ[q]*e[t-q].

The p and q can be a vector for fitting a sparse ARIMA model. For example, p = c(1,3),q = c(1,3) means the ARMA((1,3),(1,3)) model defined as

X[t] = μ + φ[1]*X[t-1] + φ[3]*X[t-3] + e[t] - θ[1]*e[t-1] - θ[3]*e[t-3].

The PDQ controls the order of seasonal ARIMA model, i.e., ARIMA(p,d,q)x(P,D,Q)(S), where S is the seasonal period. Note that the difference operators d and D = PDQ[2] are different. The d is equivalent to diff(x,differences = d) and D is diff(x,lag = D,differences = S), where the default seasonal period is S = frequency(x).

The residual diagnostics plots will be drawn.

Value

A list with class "estimate" and the same results as arima. See arima for more details.

Note

Missing values are removed before the estimate. Sparse seasonal ARIMA(p,d,q)x(P,D,Q)(S) model is not allowed.

Author(s)

Debin Qiu

References

Brockwell, P. J. and Davis, R. A. (1996). Introduction to Time Series and Forecasting. Springer, New York. Sections 3.3 and 8.3.

See Also

Examples

estimate(lh, p = 1) # AR(1) process
estimate(lh, p = 1, q = 1) # ARMA(1,1) process
estimate(lh, p = c(1,3)) # sparse AR((1,3)) process

# seasonal ARIMA(0,1,1)x(0,1,1)(12) model
estimate(USAccDeaths, p = 1, d = 1, PDQ = c(0,1,1))

aTSA

Alternative Time Series Analysis

v3.1.2
GPL-2 | GPL-3
Authors
Debin Qiu
Initial release
2015-06-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.