check_results: Check results from MPTmultiverse

Description Usage Arguments Details Examples

View source: R/check_results.R

Description

Set of helper functions that allow checking if model estimation worked as intended. Depending on the method and function, these functions return slightly different information.

Usage

1
2
3
4
5
check_results(results)

write_check_results(DATA_FILE, results, append = FALSE)

check_set(results)

Arguments

results

An object of class multiverseMPT.

DATA_FILE

character string. File name to use.

append

logical. If TRUE, output will be appended to DATA_FILE; otherwise, it will overwrite the contents of DATA_FILE.

Details

check_results prints relatively verbose output detailing diagnostic information for each method to the console. For the frequentist methods, this is based on either the rank of the observed Fischer (or Hessian) matrix of the MLE estimate or based on empirical identifiability (based either on repeated re-runs or the width of the bootstrapped parameter distribution). For the Bayesian methods, this is convergence statistics R-hat and number of effective samples. write_check_results writes the results of check_results to a specififed file (instead of printing it to the console).

check_set returns a tibble with one row, where each expected method corresponds to a column with a boolean (TRUE/FALSE) value. Entries TRUE correspond to no problem and FALSE correspond to problems. FALSE means the method is either missing from the results file or (for the Bayesian methods) there are core parameters for which the convergence criteria defined in getOption("MPTmultiverse") are not met.

Examples

1
2
3
4
5
6
7
load(file = system.file("extdata", "results_bayen_kuhlmann.RData",
                        package = "MPTmultiverse"))
## prints checks to console
check_results(results)

## returns tibble with single row
check_set(results)

MPTmultiverse documentation built on July 1, 2020, 11:37 p.m.