estimate: Estimate an ARIMA Model

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

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

Usage

1
2
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

arima, identify, forecast

Examples

1
2
3
4
5
6
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))

Example output

Attaching package: 'aTSA'

The following object is masked from 'package:graphics':

    identify

ARIMA(1,0,0) model is estimated for variable: lh 

Conditional-Sum-of-Squares & Maximum Likelihood Estimation 
      Estimate   S.E t.value  p.value Lag
MU       2.413 0.147   16.46 0.00e+00   1
AR 1     0.574 0.116    4.94 1.07e-05   1
-----
n = 48; 'sigma' = 0.4443979; AIC = 64.75832; SBC = 68.50073
------------------------------ 
Correlation of Parameter Estimates 
          MU  AR 1 
MU    1.0000 0.0408
AR 1  0.0408 1.0000
------------------------------ 
Autocorrelation Check of Residuals 
     lag    LB p.value
[1,]   4  4.69   0.320
[2,]   8  7.13   0.522
[3,]  12  8.94   0.708
[4,]  16 10.16   0.858
[5,]  20 11.55   0.931
[6,]  24 13.51   0.957
------------------------------ 
Model for variable: lh 
Estimated mean: 2.413288 
AR factors: 1 + 0.5739 B**(1)
ARIMA(1,0,1) model is estimated for variable: lh 

Conditional-Sum-of-Squares & Maximum Likelihood Estimation 
      Estimate   S.E t.value p.value Lag
MU       2.410 0.136   17.75   0.000   1
AR 1     0.452 0.177    2.56   0.014   1
MA 1     0.198 0.171    1.16   0.251   1
-----
n = 48; 'sigma' = 0.4385341; AIC = 65.52407; SBC = 71.13767
------------------------------ 
Correlation of Parameter Estimates 
           MU   AR 1    MA 1 
MU     1.0000 -0.6954  0.0321
AR 1  -0.6954  1.0000 -0.0147
MA 1   0.0321 -0.0147  1.0000
------------------------------ 
Autocorrelation Check of Residuals 
     lag    LB p.value
[1,]   4  3.17   0.529
[2,]   8  6.25   0.619
[3,]  12  8.02   0.784
[4,]  16  9.27   0.902
[5,]  20 10.49   0.958
[6,]  24 12.03   0.980
------------------------------ 
Model for variable: lh 
Estimated mean: 2.41006 
AR factors: 1 + 0.4522 B**(1)
MA factors: 1 + 0.1982 B**(1)
ARIMA(3,0,0) model is estimated for variable: lh 

Conditional-Sum-of-Squares & Maximum Likelihood Estimation 
      Estimate    S.E t.value  p.value Lag
MU       2.393 0.0965   24.79 0.00e+00   1
AR 1     0.614 0.1130    5.43 2.18e-06   1
AR 3    -0.251 0.1157   -2.17 3.52e-02   3
-----
n = 48; 'sigma' = 0.4233397; AIC = 62.32925; SBC = 67.94285
------------------------------ 
Correlation of Parameter Estimates 
            MU   AR 1     AR 3 
MU     1.00000 -0.1458 -0.00391
AR 1  -0.14576  1.0000  0.07005
AR 3  -0.00391  0.0701  1.00000
------------------------------ 
Autocorrelation Check of Residuals 
     lag    LB p.value
[1,]   4 0.473   0.976
[2,]   8 1.505   0.993
[3,]  12 4.105   0.981
[4,]  16 6.053   0.988
[5,]  20 6.834   0.997
[6,]  24 7.898   0.999
------------------------------ 
Model for variable: lh 
Estimated mean: 2.392738 
AR factors: 1 + 0.6137 B**(1) - 0.2512 B**(3)
SARIMA(1,1,0)(0,1,1)(12) model is estimated for variable: USAccDeaths 

Conditional-Sum-of-Squares & Maximum Likelihood Estimation 
      Estimate   S.E t.value p.value Lag
AR 1    -0.330 0.122   -2.70 0.00874   1
SMA 1   -0.589 0.181   -3.26 0.00172   1
-----
n = 72; 'sigma' = 319.9343; AIC = 859.2828; SBC = 863.8362
------------------------------ 
Correlation of Parameter Estimates 
       AR 1   SMA 1
AR 1  1.0000 0.0668
SMA 1 0.0668 1.0000
------------------------------ 
Autocorrelation Check of Residuals 
     lag    LB p.value
[1,]   4  4.96   0.291
[2,]   8 10.66   0.222
[3,]  12 12.51   0.406
[4,]  16 15.34   0.500
[5,]  20 20.56   0.423
[6,]  24 24.68   0.424
------------------------------ 
Model for variable: USAccDeaths 
Period(s) of Differencing: USAccDeaths(1,1) 

AR factors: 1 - 0.3304 B**(1)
SMA factors: 1  - 0.5893 B**(12) 

aTSA documentation built on May 1, 2019, 8:47 p.m.