ModelBuildMultivariateVAR: R6 class ModelBuildMultivariateVAR

Description Value Methods

Description

R6 class ModelBuildMultivariateVAR

R6 class ModelBuildMultivariateVAR

Value

A dataframe containing the following columns 'Model': Name of the model 'Selection': The selection criteria used for K value (AIC or BIC) 'Trend': The trend argument used in the VARselect and VAR functions 'SlidingASE': Whether Sliding ASE will be used for this model 'Init_K': The K value recommended by the VARselect function 'Final_K': The adjusted K value to take into account the smaller batch size (only when using sliding_ase)

Methods

Public methods


Method new()

Initialize an object to compare several Univatiate Time Series Models

Usage
ModelBuildMultivariateVAR$new(
  data = NA,
  var_interest = NA,
  mdl_list,
  alpha = 0.05,
  verbose = 0,
  ...
)
Arguments
data

The dataframe containing the time series realizations (data should not contain time index)

var_interest

The output variable of interest (dependent variable)

mdl_list

A names list of all models (see format below)

alpha

Significance level to use for filtering of variables from the recommendations (Default = 0.05)

verbose

How much to print during the model building and other processes (Default = 0)

...

Additional parameers to feed to VARSelect (if applicable) and VAR –> Most notably "exogen"

Returns

A new 'ModelCompareMultivariateVAR' object.


Method get_data()

Returns the time series realization

Usage
ModelBuildMultivariateVAR$get_data()
Returns

The Time Series Realization


Method get_var_interest()

Returns the dependent variable name

Usage
ModelBuildMultivariateVAR$get_var_interest()
Returns

The dependent variable name


Method get_data_var_interest()

Returns the dependent variable data only

Usage
ModelBuildMultivariateVAR$get_data_var_interest()
Returns

The dependent variable data only


Method set_verbose()

Adjust the verbosity level

Usage
ModelBuildMultivariateVAR$set_verbose(verbose = 0)
Arguments
verbose

0 = Minimal Printing only (usualy limited to step being performed) 1 = Basic printing of model builds, etc. 2 = Reserved for debugging mode. May slow down the run due to excessive printing, especially when using batches


Method set_alpha()

Set the significance level to use for filtering of variables from the recommendations

Usage
ModelBuildMultivariateVAR$set_alpha(alpha = 0.05)
Arguments
alpha

Significance level to use (Default = 0.05)


Method summarize_build()

Returns the VAR model Build Summary

Usage
ModelBuildMultivariateVAR$summarize_build()

Method get_recommendations()

Returns a dataframe with recommended variables to use for each VAR model along with its corresponding lag value

Usage
ModelBuildMultivariateVAR$get_recommendations()
Returns

A data frame with the recommendations (1) Number of significant variables (2) The names of the significant variables to use (3) Lag value to use for the model


Method build_recommended_models()

Builds the models with the recommended lags and variables

Usage
ModelBuildMultivariateVAR$build_recommended_models()

Method get_final_models()

Returns a final models

Usage
ModelBuildMultivariateVAR$get_final_models(subset = "a", mdl_names = NA)
Arguments
subset

The subset of models to get. 'a': All models (Default) 'u': Only User Defined Models 'r': Only the recommended models

mdl_names

Vector of model names to get. This honors the subset variable.

Returns

A named list of models


Method add_models()

Add models to the existing object

Usage
ModelBuildMultivariateVAR$add_models(mdl_list, alpha = NA, ...)
Arguments
mdl_list

The list of new models to add

alpha

Significance level to use for filtering of variables from the recommendations (Default = 0.05)

...

Additional parameers to feed to VARSelect (if applicable) and VAR –> Most notably "exogen"


Method remove_models()

Remove models from the object

Usage
ModelBuildMultivariateVAR$remove_models(mdl_names)
Arguments
mdl_names

A vector of the model names to remove.


Method keep_models()

Keep only the provided models

Usage
ModelBuildMultivariateVAR$keep_models(mdl_names)
Arguments
mdl_names

A vector of the model names to keep.


Method clone()

The objects of this class are cloneable with this method.

Usage
ModelBuildMultivariateVAR$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


josephsdavid/tswgewrapped documentation built on July 31, 2020, 9:36 a.m.