Estimates an ARIMA model for a univariate time series, including a sparse ARIMA model.
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, ...)
A list with class "estimate
" and the same results as
arima
. See arima
for
more details.
a univariate time series.
the AR order, can be a positive integer or a vector with several positive
integers. The default is 0
.
the degree of differencing. The default is 0
.
the MA order, can be a positive integer or a vector with several positive
integers. The default is 0
.
a vector with three non-negative integers for specification of the seasonal
part of the ARIMA model. The default is c(0,0,0)
.
the period of seasonal ARIMA model. The default is NA
.
fitting method. The default is CSS-ML
.
a logical value indicating to include the intercept in ARIMA model. The
default is TRUE
.
a logical value indicating to print the results in R console. The default is
TRUE
.
optional arguments to arima
function.
Debin Qiu
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
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
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.
Brockwell, P. J. and Davis, R. A. (1996). Introduction to Time Series and Forecasting. Springer, New York. Sections 3.3 and 8.3.
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))
Run the code above in your browser using DataLab