Learn R Programming

gmwmx2 (version 0.0.5)

loss_fn_gmwm: Loss function for GMWM optimization (internal)

Description

Computes the weighted squared error between empirical wavelet variance and theoretical wavelet variance implied by a model and parameter vector.

Usage

loss_fn_gmwm(theta, model, n, prep, wv_obj, omega = NULL)

Value

Scalar objective value.

Arguments

theta

Real-valued parameter vector.

model

A time_series_model or sum_model.

n

Length of autocovariance to compute.

prep

Output from prepare_optim_layout.

wv_obj

A wv::wvar object.

omega

Optional weighting matrix. If NULL, uses inverse CI width.