gmwm: Generalized Method of Wavelet Moments

Generalized Method of Wavelet Moments (GMWM) is an estimation technique for the parameters of time series models. It uses the wavelet variance in a moment matching approach that makes it particularly suitable for the estimation of certain state-space models. Furthermore, there exists a robust implementation of GMWM, which allows the robust estimation of some state-space models and ARIMA models. Lastly, the package provides the ability to quickly generate time series data, perform different wavelet decompositions, and visualizations.

Install the latest version of this package by entering the following in R:
AuthorJames Balamuta [aut, cph], Stephane Guerrier [ctb, cre, cph], Roberto Molinari [ctb, cph], Wenchao Yang [ctb]
Date of publication2016-02-10 09:11:13
MaintainerStephane Guerrier <>
LicenseCC BY-NC-SA 4.0

View on CRAN

Man pages

acf_sum: Helper Function for ARMA to WV Approximation

all_bootstrapper: Bootstrap for Everything!

AR: Create an Autoregressive P [AR(P)] Process

AR1: Create an Autoregressive 1 [AR(1)] Process

ar1_draw: Randomly guess starting parameters for AR1

ar1_to_gm: Transform AR1 to GM

ar1_to_wv: AR1 process to WV

ARMA: Create an Autoregressive Moving Average (ARMA) Process

ARMAacf_cpp: Compute Theoretical ACF for an ARMA Process

arma_adapter: ARMA Adapter to ARMA to WV Process function

arma_draws: Randomly guess starting parameters for ARMA

ARMAtoMA_cpp: Converting an ARMA Process to an Infinite MA Process

arma_to_wv: ARMA process to WV

arma_to_wv_app: ARMA process to WV approximation

auto_imu: Find the auto imu result

auto.imu: Automatically select appropriate model for IMU Automatic Model Selection Results of IMU Object

autoplot.gmwm: Graph Solution of the Generalized Method of Wavelet Moments

autoplot.gmwm1: Graph Solution of the Generalized Method of Wavelet Moments...

autoplot.gmwm2: Graph Solution of the Generalized Method of Wavelet Moments...

autoplot.gmwmComp: Compare GMWM Model Fits with ggplot2 (Internal)

autoplot.gts: Plot Time Series Data

autoplot.imu2: Plot the Wavelet Variances of IMU Object in Combined Type

autoplot.imu6: Plot the Wavelet Variances of IMU Object in Split Type

autoplot.lts: Plot the Latent Time Series Graph

autoplot.wvar: Graph Wavelet Variances

autoplot.wvarComp: Detail Implementation to Compare Wavelet Variances

autoplot.wvar.imu: Plot the Wavelet Variances of IMU Object

avar: Calculate the Allan Variance

avar_mo_cpp: Compute Maximal-Overlap Allan Variance using Means

avar_to_cpp: Compute Tau-Overlap Allan Variance

batch_modwt_wvar_cpp: Computes the MO/DWT wavelet variance for multiple processes

B_matrix: B Matrix

boot_pval_gof: Generate the Confidence Interval for GOF Bootstrapped

bootstrap_gof_test: Compute the Bootstrapped GoF Test

brickwall: Brickwall functionality for MO/DWT

brick_wall: Removal of Boundary Wavelet Coefficients

build_model_set: Build List of Unique Models

calculate_psi_matrix: Calculate the Psi matrix

cfilter: Time Series Convolution Filters

ci_eta3: Generate eta3 confidence interval

ci_eta3_robust: Generate eta3 robust confidence interval

ci_wave_variance: Generate a Confidence intervval for a Univariate Time Series

code_zero: Optim loses NaN

comb.mat: Create Combination Matrix

compare.gmwm: Graphically Compare GMWM Model Fit

compare.models: Graphically Compare GMWM Models Constructed by the Same Data

compare.wvar: Compare Wavelet Variances

compute_cov_cpp: Computes the (MODWT) wavelet covariance matrix

count_models: Count Models

cov_bootstrapper: Bootstrap for Matrix V

create_imu: Internal IMU Object Construction

create_wvar: Create a Wvar object

cust.model.score: Formats the model score matrix

decomp_theoretical_wv: Each Models Process Decomposed to WV

decomp_to_theo_wv: Decomposed WV to Single WV

demo.lts: Generate a Demo about the Latent Time Series

deriv_2nd_ar1: Analytic second derivative matrix for AR(1) process

deriv_2nd_dr: Analytic second derivative matrix for drift process

deriv_ar1: Analytic D matrix for AR(1) process

derivative_first_matrix: Analytic D matrix of Processes

deriv_dr: Analytic D matrix for drift process

deriv_qn: Analytic D matrix quantisation noise process

deriv_rw: Analytic D matrix random walk process

deriv_wn: Analytic D matrix white noise process Create a ts.model from desc string

dft_acf: Discrete Fourier Transformation for Autocovariance Function

diff_cpp: Lagged Differences in Armadillo

D_matrix: Analytic D matrix of Processes

do_polyroot_arma: Root Finding C++

do_polyroot_cpp: Root Finding C++

DR: Create an Drift (DR) Process

dr_to_wv: Drift to WV

dwt: Discrete Wavelet Transform

dwt_cpp: Discrete Wavelet Transform

e_drift: Expected value DR

fast_cov_cpp: Computes the (MODWT) wavelet covariance matrix using...

field_to_matrix: Transform an Armadillo field<vec> to a matrix

find_full_model: Find the Common Denominator of the Models

format_ci: Format the Confidence Interval for Estimates

gen_ar1: Generate an AR(1) sequence

gen_arma: Generate ARMA

gen_dr: Generate a drift

gen.gts: Create a GMWM TS Object based on model

gen_lts: Generate Latent Time Series based on Model (Internal)

gen.lts: Generate Latent Time Series Object Based on Model

gen_model: Generate Time Series based on Model (Internal)

gen_qn: Generate a Quantisation Noise (QN) sequence

gen_rw: Generate a random walk without drift

gen_wn: Generate a white noise process

getModel.gmwm: Get the model in a 'gmwm' object

getObjFun: Retrieve GMWM starting value from Yannick's objective...

getObjFunStarting: Retrieve GMWM starting value from Yannick's objective...

get_summary: Routing function for summary info

ggColor: Emulate ggplot2 default color palette

GM: Create a Gauss-Markov (GM) Process

gm_conv: GM Conversion

gm_to_ar1: Transform GM to AR1

gmwm: GMWM for Sensors, ARMA, SSM, and Robust

gmwm_engine: Engine for obtaining the GMWM Estimator

gmwm.imu: GMWM for (Robust) Sensor

gmwm_master_cpp: Master Wrapper for the GMWM Estimator

gmwm-package: Generalized Method of Wavelet Moments (GMWM) Package

gmwm_param_bootstrapper: Bootstrap for Estimating Both Theta and Theta SD

gmwm_sd_bootstrapper: Bootstrap for Standard Deviations of Theta Estimates

gmwm_update_cpp: Update Wrapper for the GMWM Estimator

gof_test: Compute the GOF Test

gts: Create a GMWM TS Object based on data

guess_initial: Randomly guess a starting parameter

guess_initial_old: Randomly guess a starting parameter

haar_filter: Haar filter construction

has: Obtain the value of an object's properties

idf_arma: Indirect Inference for ARMA

idf_arma_total: Indirect Inference for ARMA

imu: Create an IMU Object

install_imudata: Install IMU Data Package

invert_check: Check Invertibility Conditions

is_func: Is GMWM Object

is.whole: Integer Check

jacobian_arma: Calculates the Jacobian for the ARMA process

logit: Logit Function

logit2: Logit Function

logit2_inv: Logit2 Inverse Function

logit_inv: Logit Inverse Function

lts: Generate Latent Time Series Object Based on Data

m2_drift: Second moment DR

MA: Create an Moving Average Q [MA(Q)] Process

mean_diff: Mean of the First Difference of the Data

minroot: Obtain the smallest polynomial root

Mod_cpp: Absolute Value or Modulus of a Complex Number.

model_objdesc: Generate the ts model object description

model_process_desc: Generate the ts model object's process desc

model_score: Model Score

model_theta: Generate the ts model object's theta vector

Mod_squared_cpp: Absolute Value or Modulus of a Complex Number Squared.

modwt: Maximum Overlap Discrete Wavelet Transform

modwt_cpp: Maximum Overlap Discrete Wavelet Transform

modwt_wvar_cpp: Computes the (MODWT) wavelet variance

obj_extract: Extract Object

optimism_bootstrapper: Bootstrap for Optimism

opt_n_gof_bootstrapper: Bootstrap for Optimism and GoF

order_AR1s: Order AR1s by size of phi.

orderModel: Order the Model

output.format: Formats the rank.models (auto.imu) object

packageVersionCRAN: Latest Version of Package on CRAN

paperSetting: Frequent Graph Setting for Paper

placeLegend: Place Legend Wrapper to Automatic Model Selection Results of IMU Object

plot.avar: Plot Allan Variance

plot.gmwm: Wrapper to Graph Solution of the Generalized Method of...

plot.gts: Plot Time Series Data

plot.lts: Wrapper Function to Plot the Graph of Latent Time Series

plot.wvar: Wrapper to ggplot Wavelet Variances Graph

plot.wvar.imu: Wrapper Function to Plot the Wavelet Variances of IMU Object

plus-.ts.model: Add ts.model objects together

predict.gmwm: Predict future points in the time series using the solution... Print function for auto.imu object

print.avar: Prints Allan Variance

print_data: Print GMWM Data Object

print.dwt: Print Discrete Wavelet Transform

print.gmwm: Print gmwm object

print.modwt: Print Maximum Overlap Discrete Wavelet Transform

print.rank.models: Print function for rank.models object

print.summary.gmwm: Print summary.gmwm object

print.ts.model: Multiple a ts.model by constant

print.wvar: Print Wavelet Variances

print.wvcov: Print Asymptotic Covariance Matrix

pseudo_logit: Pseudo Logit Function

pseudo_logit_inv: Pseudo Logit Inverse Function

qmf: Quadrature Mirror Filter

QN: Create an Quantisation Noise (QN) Process

qn_to_wv: Quantisation Noise to WV

quantile_cpp: Find Quantiles

rank_models: Find the Rank Models result

rank.models: Automatically select appropriate model for a set of models

Rcpp_ARIMA: Hook into R's ARIMA function

read_imu: Read an IMU Binary File into R

read.imu: Read an IMU Binary File into R

rev_col_subset: Reverse Subset Column

reverse_vec: Reverse Armadillo Vector

rev_row_subset: Reverse Subset Row

rfilter: Time Series Recursive Filters

RW: Create an Random Walk (RW) Process

rw_to_wv: Random Walk to WV

scales_cpp: Computes the MODWT scales

select.desc.check: TS Model Checks

select_filter: Select the Wavelet Filter

seq_cpp: Generate a sequence of values

seq_len_cpp: Generate a sequence of values based on supplied number

sort_mat: Sort Matrix by Column

sub-.imu: Subset an IMU Object

sum_field_vec: Accumulation of Armadillo field<vec> Summary function for auto.imu object

summary.avar: Summary Allan Variance

summary.dwt: Summary Discrete Wavelet Transform

summary.gmwm: Summary of GMWM object

summary.modwt: Summary Maximum Overlap Discrete Wavelet Transform

summary.rank.models: Summary function for rank.models object

summary.wvar: Summary of Wavelet Variances

summary.wvcov: Summary Wavelet Covariance Matrix

theoretical_wv: Model Process to WV

theta_ci: Generate the Confidence Interval for Theta Estimates

times-.ts.model: Multiple a ts.model by constant

transform_values: Transform Values for Optimization

unitConversion: Convert Unit of Time Series Data

untransform_values: Revert Transform Values for Display

update.gmwm: Update GMWM object for sensor, ARMA, SSM, and Robust

update.lts: Update Object Attribute

update_obj: Update the Attributes of Objects

value: Obtain the value of an object's properties

var_drift: Variance DR

vector_to_set: Conversion function of Vector to Set

wave_variance: Generate a Wave Variance for a Univariate Time Series

WN: Create an White Noise (WN) Process

wn_to_wv: White Noise to WV

wvar: Wavelet Variance

wvar_cpp: Computes the (MODWT) wavelet variance

wvcov: Calculate the Asymptotic Covariance Matrix


acf_sum Man page
all_bootstrapper Man page
AR Man page
AR1 Man page
ar1_draw Man page
ar1_to_gm Man page
ar1_to_wv Man page
ARMA Man page
ARMAacf_cpp Man page
arma_adapter Man page
arma_draws Man page
ARMAtoMA_cpp Man page
arma_to_wv Man page
arma_to_wv_app Man page
auto_imu Man page
auto.imu Man page Man page
autoplot.gmwm Man page
autoplot.gmwm1 Man page
autoplot.gmwm2 Man page
autoplot.gmwmComp Man page
autoplot.gts Man page
autoplot.imu2 Man page
autoplot.imu6 Man page
autoplot.lts Man page
autoplot.wvar Man page
autoplot.wvarComp Man page
autoplot.wvar.imu Man page
avar Man page
avar_mo_cpp Man page
avar_to_cpp Man page
batch_modwt_wvar_cpp Man page
B_matrix Man page
boot_pval_gof Man page
bootstrap_gof_test Man page
brickwall Man page
brick_wall Man page
build_model_set Man page
calculate_psi_matrix Man page
cfilter Man page
ci_eta3 Man page
ci_eta3_robust Man page
ci_wave_variance Man page
code_zero Man page
comb.mat Man page
compare.gmwm Man page
compare.models Man page
compare.wvar Man page
compute_cov_cpp Man page Man page Man page
count_models Man page
cov_bootstrapper Man page
create_imu Man page
create_wvar Man page
cust.model.score Man page
decomp_theoretical_wv Man page
decomp_to_theo_wv Man page
demo.lts Man page
deriv_2nd_ar1 Man page
deriv_2nd_dr Man page
deriv_ar1 Man page
derivative_first_matrix Man page
deriv_dr Man page
deriv_qn Man page
deriv_rw Man page
deriv_wn Man page Man page
dft_acf Man page
diff_cpp Man page
D_matrix Man page
do_polyroot_arma Man page
do_polyroot_cpp Man page
DR Man page
dr_to_wv Man page
dwt Man page
dwt_cpp Man page
e_drift Man page
fast_cov_cpp Man page
field_to_matrix Man page
find_full_model Man page
format_ci Man page
gen_ar1 Man page
gen_arma Man page
gen_dr Man page
gen.gts Man page
gen_lts Man page
gen.lts Man page
gen_model Man page
gen_qn Man page
gen_rw Man page
gen_wn Man page
getModel.gmwm Man page
getObjFun Man page
getObjFunStarting Man page
get_summary Man page
ggColor Man page
GM Man page
gm_to_ar1 Man page
gmwm Man page
gmwm_engine Man page
gmwm.imu Man page
gmwm_master_cpp Man page
gmwm-package Man page
gmwm_param_bootstrapper Man page
gmwm_sd_bootstrapper Man page
gmwm_update_cpp Man page
gof_test Man page
gts Man page
guess_initial Man page
guess_initial_old Man page
haar_filter Man page
has Man page
has.imu Man page
idf_arma Man page
idf_arma_total Man page
imu Man page
[.imu Man page
install_imudata Man page
invert_check Man page
is.gmwm Man page
is.gts Man page
is.imu Man page
is.lts Man page
is.ts.model Man page
is.whole Man page
is.wvar Man page
jacobian_arma Man page
logit Man page
logit2 Man page
logit2_inv Man page
logit_inv Man page
lts Man page
m2_drift Man page
MA Man page
mean_diff Man page
minroot Man page
Mod_cpp Man page
model_objdesc Man page
model_process_desc Man page
model_score Man page
model_theta Man page
Mod_squared_cpp Man page
modwt Man page
modwt_cpp Man page
modwt_wvar_cpp Man page
obj_extract Man page
optimism_bootstrapper Man page
opt_n_gof_bootstrapper Man page
order_AR1s Man page
orderModel Man page
outf Man page
output.format Man page
packageVersionCRAN Man page
paperSetting Man page
placeLegend Man page Man page
plot.avar Man page
plot.gmwm Man page
plot.gts Man page
plot.lts Man page
plot.wvar Man page
plot.wvar.imu Man page
predict.gmwm Man page Man page
print.avar Man page
print.dwt Man page
print.gmwm Man page
print.gts Man page
print.imu Man page
print.lts Man page
print.modwt Man page
print.rank.models Man page
print.summary.gmwm Man page
print.ts.model Man page
print.wvar Man page
print.wvcov Man page
pseudo_logit Man page
pseudo_logit_inv Man page
qmf Man page
QN Man page
qn_to_wv Man page
quantile_cpp Man page
rank_models Man page
rank.models Man page
Rcpp_ARIMA Man page
read_imu Man page
read.imu Man page
rev_col_subset Man page
reverse_vec Man page
rev_row_subset Man page
rfilter Man page
RW Man page
rw_to_wv Man page
scales_cpp Man page
select.desc.check Man page
select_filter Man page
seq_cpp Man page
seq_len_cpp Man page
sort_mat Man page
sum_field_vec Man page Man page
summary.avar Man page
summary.dwt Man page
summary.gmwm Man page
summary.modwt Man page
summary.rank.models Man page
summary.wvar Man page
summary.wvcov Man page
theoretical_wv Man page
theta_ci Man page
transform_values Man page
*.ts.model Man page
+.ts.model Man page
unitConversion Man page
untransform_values Man page
update.gmwm Man page
update.gts Man page
update.imu Man page
update.lts Man page
update_obj Man page
value Man page
value.imu Man page
var_drift Man page
vector_to_set Man page
wave_variance Man page
WN Man page
wn_to_wv Man page
wvar Man page
wvar_cpp Man page
wvar.default Man page
wvar.gts Man page
wvar.imu Man page
wvar.lts Man page
wvcov Man page


R/onload.R R/ts.model.R R/wvar.R R/dwt.R R/is.whole.R R/imu.R R/model_selection_methods.R R/avar.r R/utilities.R R/update.R R/data_install.R R/RcppExports.R R/wvcov.R R/lts.R R/gts.R R/GMWM.R R/misc.R R/GMWM_package.R R/modwt.R
man/predict.gmwm.Rd man/dwt.Rd man/plot.gts.Rd man/wn_to_wv.Rd man/qmf.Rd man/reverse_vec.Rd man/compare.gmwm.Rd man/wvar_cpp.Rd man/arma_adapter.Rd man/compare.models.Rd man/value.Rd man/autoplot.gmwmComp.Rd man/summary.wvcov.Rd man/ARMA.Rd man/WN.Rd man/plot.lts.Rd man/wvcov.Rd man/dft_acf.Rd man/logit2_inv.Rd man/gmwm_engine.Rd man/ci_eta3_robust.Rd man/has.Rd man/arma_draws.Rd man/plus-.ts.model.Rd man/avar_to_cpp.Rd man/mean_diff.Rd man/qn_to_wv.Rd man/ man/DR.Rd man/gen_lts.Rd man/print.rank.models.Rd man/output.format.Rd man/gof_test.Rd man/model_score.Rd man/deriv_ar1.Rd man/auto_imu.Rd man/logit_inv.Rd man/calculate_psi_matrix.Rd man/compute_cov_cpp.Rd man/do_polyroot_arma.Rd man/AR.Rd man/model_theta.Rd man/deriv_wn.Rd man/cust.model.score.Rd man/gm_conv.Rd man/gen_ar1.Rd man/is_func.Rd man/wvar.Rd man/ man/ARMAacf_cpp.Rd man/placeLegend.Rd man/QN.Rd man/bootstrap_gof_test.Rd man/modwt.Rd man/is.whole.Rd man/lts.Rd man/build_model_set.Rd man/autoplot.imu6.Rd man/update.gmwm.Rd man/autoplot.wvar.imu.Rd man/autoplot.lts.Rd man/ man/theta_ci.Rd man/scales_cpp.Rd man/select.desc.check.Rd man/plot.wvar.imu.Rd man/e_drift.Rd man/invert_check.Rd man/arma_to_wv_app.Rd man/demo.lts.Rd man/acf_sum.Rd man/create_wvar.Rd man/gen_wn.Rd man/print_data.Rd man/modwt_wvar_cpp.Rd man/idf_arma_total.Rd man/getObjFun.Rd man/brick_wall.Rd man/plot.avar.Rd man/gmwm_sd_bootstrapper.Rd man/print.modwt.Rd man/gen_dr.Rd man/summary.modwt.Rd man/ci_wave_variance.Rd man/autoplot.gmwm2.Rd man/m2_drift.Rd man/guess_initial_old.Rd man/ man/print.wvar.Rd man/field_to_matrix.Rd man/auto.imu.Rd man/arma_to_wv.Rd man/rank_models.Rd man/seq_len_cpp.Rd man/order_AR1s.Rd man/unitConversion.Rd man/imu.Rd man/ci_eta3.Rd man/sub-.imu.Rd man/paperSetting.Rd man/model_process_desc.Rd man/ man/avar_mo_cpp.Rd man/plot.gmwm.Rd man/count_models.Rd man/gmwm.Rd man/brickwall.Rd man/deriv_rw.Rd man/update.lts.Rd man/summary.avar.Rd man/print.wvcov.Rd man/seq_cpp.Rd man/Rcpp_ARIMA.Rd man/deriv_2nd_dr.Rd man/gm_to_ar1.Rd man/fast_cov_cpp.Rd man/gen_rw.Rd man/print.gmwm.Rd man/gmwm_update_cpp.Rd man/decomp_to_theo_wv.Rd man/select_filter.Rd man/RW.Rd man/rfilter.Rd man/logit.Rd man/autoplot.gts.Rd man/deriv_2nd_ar1.Rd man/GM.Rd man/create_imu.Rd man/comb.mat.Rd man/obj_extract.Rd man/sum_field_vec.Rd man/gen.gts.Rd man/orderModel.Rd man/optimism_bootstrapper.Rd man/ar1_draw.Rd man/decomp_theoretical_wv.Rd man/ARMAtoMA_cpp.Rd man/dr_to_wv.Rd man/print.avar.Rd man/transform_values.Rd man/autoplot.gmwm.Rd man/getModel.gmwm.Rd man/Mod_cpp.Rd man/autoplot.gmwm1.Rd man/code_zero.Rd man/diff_cpp.Rd man/install_imudata.Rd man/read.imu.Rd man/cfilter.Rd man/jacobian_arma.Rd man/var_drift.Rd man/format_ci.Rd man/rev_col_subset.Rd man/print.dwt.Rd man/B_matrix.Rd man/summary.wvar.Rd man/times-.ts.model.Rd man/summary.dwt.Rd man/vector_to_set.Rd man/gen_arma.Rd man/deriv_qn.Rd man/derivative_first_matrix.Rd man/gmwm-package.Rd man/rank.models.Rd man/MA.Rd man/gts.Rd man/compare.wvar.Rd man/gen_model.Rd man/minroot.Rd man/guess_initial.Rd man/plot.wvar.Rd man/rev_row_subset.Rd man/autoplot.wvar.Rd man/quantile_cpp.Rd man/modwt_cpp.Rd man/autoplot.imu2.Rd man/gen.lts.Rd man/wave_variance.Rd man/print.ts.model.Rd man/avar.Rd man/gmwm_param_bootstrapper.Rd man/gmwm_master_cpp.Rd man/Mod_squared_cpp.Rd man/deriv_dr.Rd man/theoretical_wv.Rd man/dwt_cpp.Rd man/get_summary.Rd man/summary.gmwm.Rd man/cov_bootstrapper.Rd man/packageVersionCRAN.Rd man/ar1_to_gm.Rd man/pseudo_logit.Rd man/read_imu.Rd man/update_obj.Rd man/find_full_model.Rd man/rw_to_wv.Rd man/batch_modwt_wvar_cpp.Rd man/summary.rank.models.Rd man/gmwm.imu.Rd man/D_matrix.Rd man/logit2.Rd man/model_objdesc.Rd man/print.summary.gmwm.Rd man/getObjFunStarting.Rd man/pseudo_logit_inv.Rd man/all_bootstrapper.Rd man/ar1_to_wv.Rd man/autoplot.wvarComp.Rd man/gen_qn.Rd man/untransform_values.Rd man/haar_filter.Rd man/opt_n_gof_bootstrapper.Rd man/do_polyroot_cpp.Rd man/AR1.Rd man/sort_mat.Rd man/ggColor.Rd man/boot_pval_gof.Rd man/idf_arma.Rd

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.