Learn R Programming

VGAMextra (version 0.0-6)

WN.InitARMA: Estimated White Noise (WN) from the autoregressive moving-average model of order-(\(p\), \(q\)) [ARMA(\(p\), \(q\))].

Description

Estimates the unobserved white noise of the ARMA(\(p\), \(q\)) model via the corresponding inverted process.

Also, provides the initial values of ARXff, MAXff, and ARMAXff family functions.

Usage

WN.InitARMA(tsData    = NULL, 
                 order     = c(1, 0, 1),
                 whiteN    = FALSE, 
                 moreOrder = 0,
                 updateWN  = FALSE)

Value

A list with the following components:

Coeff

The initial values of the VGLM/VGAM family function in turn: ARXff, MAXff, or ARMAXff.

whiteN

(Optional) Estimated white noise enabled only for MAXff, ARMAXff . That sequence is returned if whiteN = TRUE.

Arguments

tsData

A univariate data frame containing the time series to be fitted according to an ARMA(\(p\), \(q\)) process. Data must be of class "ts".

order

A vector with three integer components. It is order of the ARMA model to be inverted. These entries, \(c(p, d, q)\), are the AR order, the degree of differencing, and the MA order, respectively.

whiteN

Logical. If TRUE, then the estimated white noise computed from the inverted ARMA model is returned. This option is enabled only for MAXff, ARMAXff family functions.

moreOrder

A non-negative integer (might be zero) used to increment the order of the AR model initially fitted to estimate the residuals, i.e., an AR(\(p\) + moreOrder) model. Empirically, values of moreOrder \( > 2\) do NOT improve accuracy of estimates. This assert, however, may vary for different time series family functions.

updateWN

Logical. if TRUE, the white noise is updated through a second regression of \(Y_{t}\) on \(Y_{t -1}, \ldots, Y_{t -p}, \widehat{\varepsilon_{t - 1}}, \ldots, \widehat{\varepsilon_{t - q} }\).

Warning

For some time series family functions, MAXff for instance, values of moreOrder \( > 3\) do NOT improve the accuracy of estimates, and may lead the algorithm to failure to converge.

Author

Victor Miranda and T. W. Yee.

Details

Overall, the autoregressive moving average process of order \(c(p, q)\), shortly denoted as ARMA(\(p\), \(q\)), with intercept \(\mu\) can be expressed as

$$y_{t} = \mu + \theta_{1} y_{t - 1} + \ldots + \theta_{p} y_{t - p} + \phi_1 \varepsilon_{t - 1} + \ldots + \phi_q \varepsilon_{t - q} + \varepsilon_{t}.$$

It is well known that it can be expressed in terms of an autoregressive process of infinite order, AR(\(\infty\)), by recursive substitutions. For instance, given a mean-zero ARMA(1, 1), $$y_{t} = \theta_1 y_{t - 1} + \phi_1 \varepsilon_{t - 1} + \varepsilon_{t}, \quad \quad (1) $$ one may express $$\varepsilon_{t - 1} = Y_{t - 1} - ( \theta_{1} y_{t - 2} + \phi_{1} \varepsilon_{t - 2} $$

Substituting this equation in (1) yields the initial inverted process, as follows: $$ y_{t} = \psi_{1} y_{t - 1} + \psi_{2} y_{t - 2} + f(\varepsilon_{t - 2}, \varepsilon_{t} ). $$ where \(f\) is a function of \(\varepsilon_{t - 2}\) and \(\varepsilon_{t}\).

Repeated substitutions as above produces the so-called inverted process, $$ y_{t} = \sum_{k = 1}^{\infty} \psi_{k} y_{t - k} + \varepsilon_{t}. \quad \quad (2) $$

\( k = 1, \ldots, \infty\). Hence, setting an acceptable order (via the moreOrder argument, \(1\) or \(2\) for instance), an AR(\(p\) + moreOrd) inverted model is internally fitted within WN.InitARMA. Consequently, the unobserved white noise, \( \{ \varepsilon_{t} \} \), is estimated by computing the residuals in (2), after regression. whiteN = TRUE enables this option.

Finally, initial values of the MAXff, and ARMAXff family functions can be computed by least squares from the estimated white noise above, \( \{ \varepsilon_{t} \} \) and the given data, \( \{ t_{t} \} \).

Initial values of ARXff are also internally computed using \( \{ t_{t} \} \) only.

References

Brockwell, P. and Davis, R. (2002) Introduction to Time Series and Forecasting. Springer, New York, USA.

Durbin, J. (1959) Efficient Estimation of Parameters in Moving-Average Models. Biometrika, 46, pp 306--316.

See Also

MAXff, ARMAXff.

Examples

Run this code


# Generating some data -> an MA(3) 
set.seed(1004)
mydata <- arima.sim( n = 200, list(ma = c(0.3, 0.56 , 0.11)) )

# Computing initial values to be passed to MAXff()
WN.InitARMA(tsData = data.frame(y = mydata), 
            order = c(0, 0, 3), 
            moreOrder = 1)

# Returning initial values and white noise.
initMA <- WN.InitARMA(tsData = data.frame(y = mydata), 
                      order = c(0, 0, 3), 
                      moreOrder = 1, 
                      whiteN = TRUE) 
                      
# Initial values passed to MAXff()
initMA$Coeff

# Estimated white noise
head(initMA$WhiteNoise)
                      

Run the code above in your browser using DataLab