autovarCore-package {autovarCore} | R Documentation |
Automatically find the best vector autoregression models and networks for a given time series data set. 'AutovarCore' evaluates eight kinds of models: models with and without log transforming the data, lag 1 and lag 2 models, and models with and without weekday dummy variables. For each of these 8 model configurations, 'AutovarCore' evaluates all possible combinations for including outlier dummies (at 2.5x the standard deviation of the residuals) and retains the best model. Model evaluation includes the Eigenvalue stability test and a configurable set of residual tests. These eight models are further reduced to four models because 'AutovarCore' determines whether adding weekday dummies improves the model fit.
The DESCRIPTION file:
Package: | autovarCore |
Type: | Package |
Title: | Automated Vector Autoregression Models and Networks |
Version: | 1.0-4 |
Date: | 2018-06-04 |
Authors@R: | c(person("Ando","Emerencia",role = c("aut","cre"), email = "ando.emerencia@gmail.com")) |
BugReports: | https://github.com/roqua/autovarcore/issues |
Maintainer: | Ando Emerencia <ando.emerencia@gmail.com> |
Description: | Automatically find the best vector autoregression models and networks for a given time series data set. 'AutovarCore' evaluates eight kinds of models: models with and without log transforming the data, lag 1 and lag 2 models, and models with and without weekday dummy variables. For each of these 8 model configurations, 'AutovarCore' evaluates all possible combinations for including outlier dummies (at 2.5x the standard deviation of the residuals) and retains the best model. Model evaluation includes the Eigenvalue stability test and a configurable set of residual tests. These eight models are further reduced to four models because 'AutovarCore' determines whether adding weekday dummies improves the model fit. |
License: | MIT + file LICENSE |
Suggests: | testthat, roxygen2 |
Imports: | Rcpp (>= 0.11.4), Amelia, jsonlite, parallel, stats, urca, vars |
LinkingTo: | Rcpp |
RoxygenNote: | 6.0.1 |
Author: | Ando Emerencia [aut, cre] |
Index of help topics:
apply_ln_transformation Applies the natural logarithm to the data set assess_joint_sktest Tests the skewness and kurtosis of a VAR model assess_kurtosis Tests the kurtosis of a VAR model assess_portmanteau Tests the white noise assumption for a VAR model using a portmanteau test on the residuals assess_portmanteau_squared Tests the homeskedasticity assumption for a VAR model using a portmanteau test on the squared residuals assess_skewness Tests the skewness of a VAR model autovar Return the best VAR models found for a time series data set autovarCore-package Automated Vector Autoregression Models and Networks coefficients_of_kurtosis Kurtosis coefficients. coefficients_of_skewness Skewness coefficients. compete Returns the winning model day_dummies Calculate weekday dummy variables daypart_dummies Calculate day-part dummy variables explode_dummies Explode dummies columns into separate dummy variables impute_datamatrix Imputes the missing values in the input data invalid_mask Calculate a bit mask to identify invalid outlier dummies model_is_stable Eigenvalue stability condition checking model_score Return the model fit for the given varest model needs_trend Determines if a trend is required for the specified VAR model outliers_column Determine the outliers column for the given column data portmanteau_test_statistics An implementation of the portmanteau test. print_correlation_matrix Print the correlation matrix of the residuals of a model annotated with p-values residual_outliers Calculate dummy variables to mask residual outliers run_tests Execute a series of model validity assumptions run_var Calculate the VAR model and apply restrictions select_valid_masks Select and return valid dummy outlier masks selected_columns Convert an outlier_mask to a vector of column indices significance_from_pearson_coef Calculate the significance of a Pearson correlation coefficient sktest_joint_p SK test p-level trend_columns Construct linear and quadratic trend columns validate_params Validates the params given to the autovar function validate_raw_dataframe Validates the dataframe given to the autovar function
Please see the help of the autovar
function for information on how to use this package.
NA
Maintainer: Ando Emerencia <ando.emerencia@gmail.com>
Emerencia, A. C., L. van der Krieke, E. H. Bos, P. de Jonge, N. Petkov and M. Aiello (2016), Automating Vector Autoregression on Electronic Patient Diary Data, IEEE Journal of Biomedical and Health Informatics, 20(2): 631-643, https://doi.org/10.1109/JBHI.2015.2402280
## Not run: # AutovarCore requires input data in data.frame format. # If you have data in a .csv, .dta, or .sav file, use # the 'foreign' library to load this data into R first. # (You may need to type: # install.packages('foreign') # if you do not have the foreign library installed on # your system.) # This example data set can be downloaded from # https://autovar.nl/datasets/aug_pp5_da.sav suppressWarnings(dfile <- foreign::read.spss('~/Downloads/aug_pp5_da.sav')) dframe <- data.frame(Activity = dfile$Activity, Depression = dfile$Depression) # Call autovar with the given data frame. Type: # ?autovar # (after having typed "library('autovarCore')") to see # which other options are available. models_found <- autovar(dframe, selected_column_names = c('Activity', 'Depression')) # Show details for the best model found print(models_found[[1]]) ## End(Not run)