Skip to contents

Innovations are recovered with zero pre-sample values, the ARMA forecast is formed on the differenced scale, and the differencing is undone by adding back the last value of each lower-order difference. theta uses the PLUS sign convention.

Usage

morie_geron_arima_forecast(y, phi, theta, d = 0)

Arguments

y

Observed series.

phi

AR coefficients.

theta

MA coefficients.

d

Differencing order.

Value

List with forecast, forecast_differenced, residuals, differenced, sigma2, order.

Examples

morie_geron_arima_forecast(y = c(1, 2, 3, 4, 5, 6, 7, 8), phi = 0.5, theta = 0.5)
#> $forecast
#> [1] 5.554688
#> 
#> $forecast_differenced
#> [1] 5.554688
#> 
#> $residuals
#> [1] 1.000000 1.000000 1.500000 1.750000 2.125000 2.437500 2.781250 3.109375
#> 
#> $differenced
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $sigma2
#> [1] 4.396637
#> 
#> $order
#> [1] 1 0 1
#> 
#> $estimate
#> [1] 5.554688
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "ARIMA(p, d, q) one-step-ahead forecast"
#>