Performs estimation of time series models by using the GMWM estimator.
gmwm(model, data, model.type = "ssm", compute.v = "auto",
robust = FALSE, eff = 0.6, alpha = 0.05, seed = 1337, G = NULL,
K = 1, H = 100, freq = 1)
A ts.model
object containing one of the allowed models.
A matrix
or data.frame
object with only column
(e.g. \(N \times 1\)), a lts
object,
or a gts
object.
A string
containing the type of GMWM needed:
"imu"
or "ssm"
.
A string
indicating the type of covariance matrix
solver. Valid values are:
"fast"
, "bootstrap"
,
"diag"
(asymptotic diag),
"full"
(asymptotic full). By default, the program
will fit a "fast" model.
A boolean
indicating whether to use the robust
computation (TRUE
) or not (FALSE
).
A double
between 0 and 1 that indicates the
efficiency.
A double
between 0 and 1 that correspondings to the
\(\frac{\alpha}{2}\) value for the wavelet
confidence intervals.
An integer
that controls the reproducibility of the
auto model selection phase.
An integer
to sample the space for IMU and SSM
models to ensure optimal identitability.
An integer
that controls how many times the
bootstrapping procedure will be initiated.
An integer
that indicates how many different
samples the bootstrap will be collect.
A double
that indicates the sampling frequency. By
default, this is set to 1 and only is important if GM()
is in the model
A gmwm
object with the structure:
Estimated Parameters Values from the GMWM Procedure
Initial Starting Values given to the Optimization Algorithm
The data's empirical wavelet variance
Lower Confidence Interval
Upper Confidence Interval
Original V matrix
Updated V matrix (if bootstrapped)
The V matrix inversed
Value of the objective function at Estimated Parameter Values
Summed Theoretical Wavelet Variance
Decomposed Theoretical Wavelet Variance by Process
Scales of the GMWM Object
Indicates if parameter estimation was done under robust or classical
Level of efficiency of robust estimation
Models being guessed
Type of V matrix computation
Indicates moments have been augmented
Alpha level used to generate confidence intervals
Mean of the First Difference of the Signal
Length of the Signal
Number of Guesses Performed
Number of Bootstrap replications
Number of V matrix bootstraps
ts.model
supplied to gmwm
A new value of ts.model
object supplied to gmwm
Indicates whether the procedure used the initial guessing approach
Randomization seed used to generate the guessing values
Frequency of data
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:
a first order autoregressive process with parameters \((\phi,\sigma^2)\)
a guass-markov process \((\beta,\sigma_{gm}^2)\)
an autoregressive moving average process with parameters \((\phi _p, \theta _q, \sigma^2)\)
a drift with parameter \(\omega\)
a quantization noise process with parameter \(Q\)
a random walk process with parameter \(\sigma^2\)
a white noise process with parameter \(\sigma^2\)
If only an ARMA() term is supplied, then the function takes conditional least squares as starting values If robust = TRUE the function takes the robust estimate of the wavelet variance to be used in the GMWM estimation procedure.