From f2189d484b61553c91888727778f34b9b3e35df0 Mon Sep 17 00:00:00 2001 From: Ando Emerencia Date: Thu, 5 Feb 2015 17:28:31 +0100 Subject: [PATCH 1/4] fixed desriptions to be more accurate --- DESCRIPTION | 8 ++++---- R/var_main.r | 9 +++++++-- README.md | 2 +- inst/www/index.html | 2 +- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 76cb526..a1b5128 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: autovar -Version: 0.1-1 -Date: 2014-07-07 +Version: 0.2-0 +Date: 2015-02-05 Title: Automated Vector Autoregression Model Creation Authors@R: c(person("Ando","Emerencia",role = c("aut","cre"), email = "ando.emerencia@gmail.com")) @@ -28,6 +28,6 @@ Depends: Suggests: testthat, roxygen2 -Description: A package to simplify the process from raw SPSS or - STATA data to VAR models. +Description: A package to simplify the process from raw + data to VAR models. License: Unlimited diff --git a/R/var_main.r b/R/var_main.r index 2434a14..ea84f24 100644 --- a/R/var_main.r +++ b/R/var_main.r @@ -34,10 +34,15 @@ #' @param include_squared_trend determines whether the square of the trend is included if the trend is included for a model. The trend variable is specified using the \code{\link{order_by}} function. #' @param normalize_data determines whether the endogenous variables should be normalized. #' @param include_lag_zero determines whether models at lag order 0 are should be considered. These are models at lag 1 with constrained lag-1 parameters in all equations. -#' @param split_up_outliers determines whether each outlier should have its own exogenous variable. This will make a difference for restricted models only, and only when there is a variable with multiple outliers. +#' @param split_up_outliers determines whether each outlier should have its own exogenous variable. This will make a difference only when there is a variable with multiple outliers. #' @param format_output_like_stata when \code{TRUE}, all constraints and exogenous variables are always shown (i.e., it will now show exogenous variables that were included but constrained in all equations), and the constraints are formatted like in Stata. #' @param exclude_almost when \code{TRUE}, only Granger causalities with p-value <= 0.05 are included in the results. When \code{FALSE}, p-values between 0.05 and 0.10 are also included in results as "almost Granger causalities" that have half the weight of actual Granger causalities in the Granger causality summary graph. -#' @param simple_models when \code{TRUE}, only simple models are returned, meaning we don't add constrained models. Also, this setting forces \code{exogenous_max_iterations} to 1 and forces the first iteration to search for outliers at the 2.5x std range (essentially skipping the first and second iteration). +#' @param simple_models when \code{TRUE}, four changes are made in the way Autovar works. \itemize{ +#' \item \code{1} - Sets autovar to search only for lag 1 and lag 2 models. Additionally, the lag 2 models are restricted in the sense that only the autoregressive lag 2 is used, i.e., the cross-lagged parameters for lag 2 are constrained. +#' \item \code{2} - The normality assumption (sktest) no longer tests for kurtosis (only for skewness). +#' \item \code{3} - \code{exogenous_max_iterations} is set to 1, meaning we only search one iteration deep for masking outliers, and in this iteration, points that are 2.5xstd away in the residuals or in the squared residuals are masked as outliers. +#' \item \code{4} - Autovar no longer adds constrained versions of the valid models to the list of accepted models. +#' } #' @param numcores is the number of cores to use in parallel for evaluation the model. When this variable is \code{1}, no parallel processing is used and all processing is done serially. This variable has to be an integer between 1 and 16. The default value is the detected number of cores on the system (using \code{detectCores()}). If the \code{log_level} is less than 3, the value for \code{numcores} is forced to 1 because output doesn't show up otherwise. #' @return This function returns the modified \code{av_state} object. The lists of accepted and rejected models can be retrieved through \code{av_state$accepted_models} and \code{av_state$rejected_models}. To print these, use \code{print_accepted_models(av_state)} and \code{print_rejected_models(av_state)}. #' @examples diff --git a/README.md b/README.md index 17f2431..3212e34 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Autovar ======= -Autovar is an R package for automating and simplifying the process from raw SPSS or STATA data to VAR models. For the actual VAR calculations, Bernhard Pfaff's vars package is used. +Autovar is an R package for automating and simplifying the process from raw data to VAR models. For the actual VAR calculations, Bernhard Pfaff's vars package is used. To install, type the following: diff --git a/inst/www/index.html b/inst/www/index.html index fa333db..a5a5202 100644 --- a/inst/www/index.html +++ b/inst/www/index.html @@ -413,7 +413,7 @@

Example data sets and use

- To determine whether each outlier should have its own exogenous variable. This will make a difference for restricted models only, and only when there is a variable with multiple outliers. + To determine whether each outlier should have its own exogenous variable. This will make a difference only when there is a variable with multiple outliers.
From e322c8861c6ee5f82adda5cb6d5529b0a841c5b4 Mon Sep 17 00:00:00 2001 From: Ando Emerencia Date: Thu, 5 Feb 2015 17:45:34 +0100 Subject: [PATCH 2/4] updated help files --- man/var_main.Rd | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/man/var_main.Rd b/man/var_main.Rd index 2190f29..3a72283 100644 --- a/man/var_main.Rd +++ b/man/var_main.Rd @@ -68,13 +68,18 @@ The above example includes a model with \code{lag=3} (so lags 1, 2, and 3 are in \item{include_lag_zero}{determines whether models at lag order 0 are should be considered. These are models at lag 1 with constrained lag-1 parameters in all equations.} -\item{split_up_outliers}{determines whether each outlier should have its own exogenous variable. This will make a difference for restricted models only, and only when there is a variable with multiple outliers.} +\item{split_up_outliers}{determines whether each outlier should have its own exogenous variable. This will make a difference only when there is a variable with multiple outliers.} \item{format_output_like_stata}{when \code{TRUE}, all constraints and exogenous variables are always shown (i.e., it will now show exogenous variables that were included but constrained in all equations), and the constraints are formatted like in Stata.} \item{exclude_almost}{when \code{TRUE}, only Granger causalities with p-value <= 0.05 are included in the results. When \code{FALSE}, p-values between 0.05 and 0.10 are also included in results as "almost Granger causalities" that have half the weight of actual Granger causalities in the Granger causality summary graph.} -\item{simple_models}{when \code{TRUE}, only simple models are returned, meaning we don't add constrained models. Also, this setting forces \code{exogenous_max_iterations} to 1 and forces the first iteration to search for outliers at the 2.5x std range (essentially skipping the first and second iteration).} +\item{simple_models}{when \code{TRUE}, four changes are made in the way Autovar works. \itemize{ +\item \code{1} - Sets autovar to search only for lag 1 and lag 2 models. Additionally, the lag 2 models are restricted in the sense that only the autoregressive lag 2 is used, i.e., the cross-lagged parameters for lag 2 are constrained. +\item \code{2} - The normality assumption (sktest) no longer tests for kurtosis (only for skewness). +\item \code{3} - \code{exogenous_max_iterations} is set to 1, meaning we only search one iteration deep for masking outliers, and in this iteration, points that are 2.5xstd away in the residuals or in the squared residuals are masked as outliers. +\item \code{4} - Autovar no longer adds constrained versions of the valid models to the list of accepted models. +}} \item{numcores}{is the number of cores to use in parallel for evaluation the model. When this variable is \code{1}, no parallel processing is used and all processing is done serially. This variable has to be an integer between 1 and 16. The default value is the detected number of cores on the system (using \code{detectCores()}). If the \code{log_level} is less than 3, the value for \code{numcores} is forced to 1 because output doesn't show up otherwise.} } From 1a594ca0b0d2546731171f53aaa56a251b4ad365 Mon Sep 17 00:00:00 2001 From: Ando Emerencia Date: Thu, 5 Feb 2015 17:49:24 +0100 Subject: [PATCH 3/4] updated help files --- inst/help_files/add_derived_column.html | 64 ++++++++------ inst/help_files/add_trend.html | 78 +++++++++++------- .../contemporaneous_correlations_plot-3.png | Bin 33996 -> 34040 bytes .../contemporaneous_correlations_plot-5.png | Bin 42854 -> 42703 bytes .../contemporaneous_correlations_plot.html | 4 +- inst/help_files/convert_to_graph.html | 8 +- inst/help_files/generate_network.html | 4 +- inst/help_files/generate_networks.html | 8 +- inst/help_files/group_by.html | 4 +- inst/help_files/impute_dataframe.html | 4 +- inst/help_files/impute_missing_values.html | 4 +- inst/help_files/index.html | 6 +- inst/help_files/load_dataframe.html | 4 +- inst/help_files/load_file.html | 34 ++++---- inst/help_files/order_by.html | 4 +- inst/help_files/plot_barchart-3.png | Bin 33960 -> 33996 bytes inst/help_files/plot_barchart-5.png | Bin 42758 -> 42733 bytes inst/help_files/plot_barchart.html | 4 +- inst/help_files/print_accepted_models-3.png | Bin 33965 -> 34040 bytes inst/help_files/print_accepted_models-5.png | Bin 42854 -> 42748 bytes inst/help_files/print_accepted_models.html | 4 +- inst/help_files/print_best_models-5.png | Bin 42854 -> 42748 bytes inst/help_files/print_best_models.html | 4 +- inst/help_files/print_rejected_models-5.png | Bin 42758 -> 42733 bytes inst/help_files/print_rejected_models.html | 4 +- inst/help_files/select_range.html | 4 +- inst/help_files/select_relevant_columns.html | 7 +- inst/help_files/select_relevant_rows.html | 4 +- inst/help_files/set_timestamps.html | 4 +- inst/help_files/store_file.html | 4 +- inst/help_files/var_info-3.png | Bin 35349 -> 35237 bytes inst/help_files/var_info-5.png | Bin 41778 -> 41740 bytes inst/help_files/var_info.html | 4 +- inst/help_files/var_main-5.png | Bin 33926 -> 33901 bytes inst/help_files/var_main-7.png | Bin 42805 -> 42522 bytes inst/help_files/var_main.html | 18 +++- inst/help_files/var_summary-11.png | Bin 42758 -> 42733 bytes inst/help_files/var_summary-3.png | Bin 33960 -> 34040 bytes inst/help_files/var_summary-5.png | Bin 42796 -> 42703 bytes inst/help_files/var_summary-9.png | Bin 33996 -> 34040 bytes inst/help_files/var_summary.html | 4 +- inst/help_files/vargranger_plot-3.png | Bin 34040 -> 33965 bytes inst/help_files/vargranger_plot-5.png | Bin 42758 -> 42759 bytes inst/help_files/vargranger_plot-8.png | Bin 42854 -> 42703 bytes inst/help_files/vargranger_plot.html | 4 +- inst/help_files/visualize.html | 4 +- inst/help_files/visualize_residuals-7.png | Bin 41906 -> 41787 bytes inst/help_files/visualize_residuals.html | 4 +- 48 files changed, 173 insertions(+), 130 deletions(-) diff --git a/inst/help_files/add_derived_column.html b/inst/help_files/add_derived_column.html index 2aed258..7d62baa 100644 --- a/inst/help_files/add_derived_column.html +++ b/inst/help_files/add_derived_column.html @@ -2,7 +2,7 @@ -add_derived_column. autovar 0.1-1 +add_derived_column. autovar 0.2-0 @@ -20,7 +20,7 @@