check_raw_stats: Check linear dependencies among raw summary statistics

check_raw_statsR Documentation

Check linear dependencies among raw summary statistics

Description

A convenient wrapper function for caret::findLinearCombos, allowing to detect linear dependencies among the statistics, and optionally to remove variables that induce them.

Usage

check_raw_stats(x, statNames, remove = FALSE, verbose = interactive())

Arguments

x

data frame (particularly inheriting from class "reftable", i.e. a reference table of simulations); or possibly a matrix with column names

statNames

Character vector: variables among which dependencies are sought. Must belong column names of x. For a reftable, this argument is optional and by default, all raw statistic are included. For other classes of input, this argument is required.

remove

Boolean: whether to return x with “offending” columns removed, or other information.

verbose

Boolean: whether to display some messages.

Value

Return type depends on the availability of the caret package, and on the remove argument, as follows. if remove=TRUE, an object of the same class as x is returned (with redundant columns removed). If remove=FALSE, either the caret package is available, in which case a list is returned with the same structure as the return value of caret::findLinearCombos but with column indices replaced by column names; or a message pointing that caret is not available is returned (and another is printed, only once per session).


Infusion documentation built on May 3, 2023, 5:10 p.m.