This function uses a list of default params that may be overwritten the params argument. stop() errors are thrown when invalid params are supplied.

validate_params(data_matrix, params)

## Arguments

data_matrix The raw, unimputed data matrix. This parameter is supplied so that we can verify the selected column names. A list with the following named entries: selected_column_names - The endogenous variables in the models, specified as a vector of character strings. This argument is required. The selected column names should be a subset of the column names of data_matrix. significance_levels - A vector with descending p values that indicate cut-offs placing models in different buckets. If it is not specified, this parameter defaults to c(0.05, 0.01, 0.005). For example, with the default configuration, a model whose worst (lowest) p-level for any test is 0.03 is always seen as a better model than one whose worst p-level for any test is 0.009, no matter the AIC/BIC score of that model. Also, the lowest significance level indicates the minimum p-level for any test of a valid model. Thus, if a test for a model has a lower p-level than the minimum specified significance level, it is considered invalid. test_names - The residual tests that should be performed, specified as a vector of character strings. If not specified, this parameter defaults to c('portmanteau', 'portmanteau_squared', 'skewness'). The possible tests are returned by the function autovarCore:::supported_test_names(). In addition to the residual tests, please note that the Eigenvalue stability test is always performed. criterion - The information criterion used to sort the models. Valid options are 'AIC' (the default) or 'BIC'. imputation_iterations - The number of times we average over one Amelia call for imputing the data set. Since one Amelia call averages over five imputations on its own, the actual number of imputations is five times the number specified here. The default value for this parameter is 30. measurements_per_day - The number of measurements per day in the time series data. The default value for this parameter is 1.

## Value

A list containing augmented params.

## Examples

data_matrix <- matrix(ncol = 3, nrow = 5)
data_matrix[, 1] <- 1
data_matrix[, 2] <- c(1, 3, 5, 6, 7)
data_matrix[, 3] <- c(1, 0, 1, NA, 1)
colnames(data_matrix) <- c('id', 'tijdstip', 'home')
autovarCore:::validate_params(data_matrix,
list(selected_column_names = c('tijdstip', 'home'),
imputation_iterations = 20))#> $significance_levels #> [1] 0.050 0.010 0.005 #> #>$test_names
#> [1] "portmanteau"         "portmanteau_squared" "skewness"
#>
#> $criterion #> [1] "AIC" #> #>$imputation_iterations
#> [1] 20
#>
#> $measurements_per_day #> [1] 1 #> #>$selected_column_names
#> [1] "tijdstip" "home"
#>