Skip to contents

Stage one fits a long AR(m) by OLS and keeps its residuals as innovation proxies; stage two regresses w_t on p own lags and q lagged proxies. Two OLS solves, no iteration.

Usage

Arimahr(y, p = 1, q = 1, d = 0, m = NULL)

Arguments

y

Observed series.

p, q

Autoregressive and moving-average orders.

d

Order of differencing.

m

Order of the stage-one autoregression; NULL uses max(p + q + 1, floor(sqrt(n)) + 1).

Value

List with phi, theta, intercept, sigma2, resid, m, p, q, d, nobs.

References

Hannan and Rissanen (1982), Biometrika 69(1), 81-94; the ARIMA model is Box, Jenkins and Reinsel (1994), Chapter 4. Standard published form; neither source is in the local corpus and neither was read.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Arimahr(V)
#> $phi
#> [1] 1
#> 
#> $theta
#> [1] -8.478067e-16
#> 
#> $intercept
#> [1] 1
#> 
#> $sigma2
#> [1] 4.733165e-30
#> 
#> $resid
#> [1]  8.881784e-16  8.881784e-16  0.000000e+00 -1.776357e-15
#> 
#> $m
#> [1] 3
#> 
#> $p
#> [1] 1
#> 
#> $q
#> [1] 1
#> 
#> $d
#> [1] 0
#> 
#> $nobs
#> [1] 4
#> 
#> $method
#> [1] "Hannan-Rissanen ARMA estimation (Hannan-Rissanen 1982)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"