| cwfact | R Documentation |
cwfact performs the Cramer-Wold factorization of the generating
autocovariance function of a pure moving average (MA) process, expressed as:
g(x) = \theta(x)\theta(x^{-1})
where
g(x) = g_0 + g_1(x +
x^{-1}) + \dots + g_q(x^q + x^{-q})
and
\theta(x) = \theta_0 +
\theta_1 x + \dots + \theta_q x^q
cwfact(
g,
th = NULL,
method = c("roots", "wilson", "best"),
tol = 1e-08,
iter.max = 500
)
g |
A numeric vector with the autocovariance coefficients |
th |
Optional numeric vector with initial values for the MA coefficients
|
method |
A character string specifying the factorization method to use.
Options are |
tol |
A numeric tolerance for convergence (only used for |
iter.max |
Maximum number of iterations for the Wilson method. Default
is |
The factorization can be computed by finding the roots of the polynomial
g(x), or using the iterative Wilson (1969) algorithm as implemented by
Laurie (1981).
The implementation for method = "laurie" is a custom R
adaptation of Algorithm AS 175 from Laurie (1981).
A numeric vector containing the moving average coefficients
c(theta_0, ..., theta_q).
Wilson, G. T. (1969). Factorization of the covariance generating function of a pure moving average process. SIAM Journal on Numerical Analysis, 6(1), 1–7.
Laurie, D. P. (1981). Cramer-Wold Factorization. Journal of the Royal Statistical Society Series C: Applied Statistics, 31(1), 86–93.
g <- autocov(um(ma = "1 - 0.8B"), lag.max = 1)
cwfact(g, method = "roots")
cwfact(g, method = "wilson")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.