autovarCore (version 1.0-4)

run_tests: Execute a series of model validity assumptions

Description

This function returns the given suite of tests on for the given VAR model. For each test, the result is the minimum p-level of all the assumptions and p-levels checked within the test. In other words, the result of a test is the p-level that should be used as a threshold below which outcomes are considered statistically significant (e.g., a result of 0.06 is better than a result of 0.03). The run_tests function returns a vector of results, one for each test, in the order corresponding to the test_names argument.

Usage

run_tests(varest, test_names)

Arguments

varest

A varest model.

test_names

A vector of names of tests given as character strings. Supported tests are specified in the autovarCore:::supported_test_names() function.

Value

This function returns a vector of p-levels.

Examples

Run this code
# NOT RUN {
data_matrix <- matrix(nrow = 40, ncol = 3)
data_matrix[, ] <- runif(ncol(data_matrix) * nrow(data_matrix), 1, nrow(data_matrix))
colnames(data_matrix) <- c('rumination', 'happiness', 'activity')
varest <- autovarCore:::run_var(data_matrix, NULL, 1)
autovarCore:::run_tests(varest, 'portmanteau')
# }

Run the code above in your browser using DataLab