gmwm2: GMWM estimator

View source: R/gmwm2.R

gmwm2R Documentation

GMWM estimator

Description

Implements the Generalized Method of Wavelet Moments (GMWM) estimator to fit a time_series_model, a sum_model or a numeric vector.

Usage

gmwm2(x, model, omega = NULL, method = "L-BFGS-B", control = list(), ...)

Arguments

x

Numeric vector, or a generated_time_series / generated_composite_model_time_series object (its series is used).

model

A time_series_model or sum_model.

omega

Optional weighting matrix. If NULL, a default based on the empirical WV confidence intervals is used.

method

Optimization method passed to stats::optim.

control

Optional list of control parameters for stats::optim.

...

Additional arguments passed to stats::optim.

Details

The GMWM estimator solves a weighted least-squares criterion of the form

\left\{\hat{\boldsymbol{\nu}} - \boldsymbol{\nu}(\boldsymbol{\theta})\right\}^{\top} \boldsymbol{\Omega} \left\{\hat{\boldsymbol{\nu}} - \boldsymbol{\nu}(\boldsymbol{\theta})\right\}

where \hat{\boldsymbol{\nu}} denotes the empirical wavelet variance and \boldsymbol{\nu}(\boldsymbol{\theta}) the corresponding theoretical wavelet variance implied by the model parameters \boldsymbol{\theta}. The weighting matrix \boldsymbol{\Omega} defaults to a diagonal matrix with entries proportional to the inverse squared width of the empirical WV asymptotic confidence intervals. Provide omega to use a custom weighting (e.g., from a theoretical covariance).

Value

An object of class gmwm2_fit with elements: theta_hat (real space), theta_domain (constrained space), model, empirical_wvar, theoretical_wvar, optim, and n.

References

Guerrier, S., Skaloud, J., Stebler, Y., and Victoria-Feser, M.-P. (2013). Wavelet-variance-based estimation for composite stochastic processes. Journal of the American Statistical Association, 108(503), 1021-1030. doi:10.1080/01621459.2013.799920.

Examples

n = 10000
mod = wn(20) + ar1(phi = .995, sigma2 = .2)
y = generate(mod, n = n, seed = 123)
plot(y)
fit = gmwm2(y, model = wn() + ar1())
fit
plot(fit)

gmwmx2 documentation built on June 10, 2026, 5:06 p.m.