Performs estimation of time series models by using the GMWM estimator.

mgmwm(mimu, model = NULL, CI = FALSE, alpha_ci = NULL,
  n_boot_ci_max = NULL, stationarity_test = FALSE,
  B_stationarity_test = 30, alpha_near_test = NULL, seed = 2710)

Arguments

mimu

A mimu object.

model

A ts.model object containing one of the allowed models.

CI

A bolean to compute the confidence intervals for estimated parameters.

alpha_ci

A double between 0 and 1 that correspondings to the \(\frac{\alpha}{2}\) value for the parameter confidence intervals.

n_boot_ci_max

A double representing the maximum number of bootstrap replicates for parameters confidence intervals computaion.

stationarity_test

A bolean to compute the near-stationarity test.

B_stationarity_test

A double representing the number of bootstrap replicates. for near-stationarity test computation.

alpha_near_test

A double between 0 and 1 that correspondings to the rejection region for the p value in the near-stationarity test

seed

An integer that controls the reproducibility of the auto model selection phase.

Value

A mgmwm object with the structure:

estimates

Estimated Parameters Values from the MGMWM Procedure

wv_empir

The data's empirical wavelet variance

ci_low

Lower Confidence Interval

ci_high

Upper Confidence Interval

obj_fun

Value of the objective function at Estimated Parameter Values

theo

Summed Theoretical Wavelet Variance

decomp.theo

Decomposed Theoretical Wavelet Variance by Process

scales

Scales of the GMWM Object

model.type

Models being guessed

alpha

Alpha level used to generate confidence intervals

model

ts.model supplied to gmwm

model.hat

A new value of ts.model object supplied to gmwm

Details

This function is under work. Some of the features are active. Others... Not so much.

The V matrix is calculated by: \(diag\left[ {{{\left( {Hi - Lo} \right)}^2}} \right]\).

The function is implemented in the following manner: 1. Calculate MODWT of data with levels = floor(log2(data)) 2. Apply the brick.wall of the MODWT (e.g. remove boundary values) 3. Compute the empirical wavelet variance (WV Empirical). 4. Obtain the V matrix by squaring the difference of the WV Empirical's Chi-squared confidence interval (hi - lo)^2 5. Optimize the values to obtain \(\hat{\theta}\) 6. If FAST = TRUE, return these results. Else, continue.

Loop k = 1 to K Loop h = 1 to H 7. Simulate xt under \(F_{\hat{\theta}}\) 8. Compute WV Empirical END 9. Calculate the covariance matrix 10. Optimize the values to obtain \(\hat{\theta}\) END 11. Return optimized values.

The function estimates a variety of time series models. If type = "imu" or "ssm", then parameter vector should indicate the characters of the models that compose the latent or state-space model. The model options are:

"AR1"

a first order autoregressive process with parameters \((\phi,\sigma^2)\)

"GM"

a guass-markov process \((\beta,\sigma_{gm}^2)\)

"DR"

a drift with parameter \(\omega\)

"QN"

a quantization noise process with parameter \(Q\)

"RW"

a random walk process with parameter \(\sigma^2\)

"WN"

a white noise process with parameter \(\sigma^2\)

Examples

# AR set.seed(1336) n = 200 data = gen_gts(n, AR1(phi = .99, sigma2 = 0.01) + WN(sigma2 = 1)) # Models can contain specific parameters e.g. adv.model = gmwm(AR1(phi = .99, sigma2 = 0.01) + WN(sigma2 = 0.01), data) # Or we can guess the parameters: guided.model = gmwm(AR1() + WN(), data) # Want to try different models? guided.ar1 = gmwm(AR1(), data) # Faster: guided.ar1.wn.prev = update(guided.ar1, AR1()+WN()) # OR # Create new GMWM object. # Note this is SLOWER since the Covariance Matrix is recalculated. guided.ar1.wn.new = gmwm(AR1()+WN(), data)