ModelBuildMultivariateVAR.Rd
R6 class ModelBuildMultivariateVAR
R6 class ModelBuildMultivariateVAR
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)
new()
Initialize an object to compare several Univatiate Time Series Models
ModelBuildMultivariateVAR$new( data = NA, var_interest = NA, mdl_list, alpha = 0.05, verbose = 0, ... )
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"
A new `ModelCompareMultivariateVAR` object.
get_data()
Returns the time series realization
ModelBuildMultivariateVAR$get_data()
The Time Series Realization
get_var_interest()
Returns the dependent variable name
ModelBuildMultivariateVAR$get_var_interest()
The dependent variable name
get_data_var_interest()
Returns the dependent variable data only
ModelBuildMultivariateVAR$get_data_var_interest()
The dependent variable data only
set_verbose()
Adjust the verbosity level
ModelBuildMultivariateVAR$set_verbose(verbose = 0)
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
set_alpha()
Set the significance level to use for filtering of variables from the recommendations
ModelBuildMultivariateVAR$set_alpha(alpha = 0.05)
alpha
Significance level to use (Default = 0.05)
summarize_build()
Returns the VAR model Build Summary
ModelBuildMultivariateVAR$summarize_build()
get_recommendations()
Returns a dataframe with recommended variables to use for each VAR model along with its corresponding lag value
ModelBuildMultivariateVAR$get_recommendations()
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
build_recommended_models()
Builds the models with the recommended lags and variables
ModelBuildMultivariateVAR$build_recommended_models()
get_final_models()
Returns a final models
ModelBuildMultivariateVAR$get_final_models(subset = "a", mdl_names = NA)
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.
A named list of models
add_models()
Add models to the existing object
ModelBuildMultivariateVAR$add_models(mdl_list, alpha = NA, ...)
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"
remove_models()
Remove models from the object
ModelBuildMultivariateVAR$remove_models(mdl_names)
mdl_names
A vector of the model names to remove.
keep_models()
Keep only the provided models
ModelBuildMultivariateVAR$keep_models(mdl_names)
mdl_names
A vector of the model names to keep.
clone()
The objects of this class are cloneable with this method.
ModelBuildMultivariateVAR$clone(deep = FALSE)
deep
Whether to make a deep clone.