Learn R Programming

collinear (version 3.0.0)

validate_arg_max_cor: Check and constrain argument max_cor

Description

Check and constrain argument max_cor

Usage

validate_arg_max_cor(max_cor = NULL, quiet = FALSE, function_name = NULL)

Value

numeric or NULL

Arguments

max_cor

(optional; numeric or NULL) Maximum correlation allowed between pairs of predictors. Valid values are between 0.01 and 0.99, and recommended values are between 0.5 (strict) and 0.9 (permissive). Default: 0.7

quiet

(optional; logical) If FALSE, messages are printed. Default: FALSE.

function_name

(optional, character string) Name of the function performing the argument check. Default: NULL

See Also

Other argument_validation: drop_geometry_column(), validate_arg_df(), validate_arg_df_not_null(), validate_arg_encoding_method(), validate_arg_f(), validate_arg_function_name(), validate_arg_max_vif(), validate_arg_predictors(), validate_arg_preference_order(), validate_arg_quiet(), validate_arg_responses()

Examples

Run this code
x <- validate_arg_max_cor(
  max_cor = 1.5, #wrong value
  quiet = FALSE
)

x
attributes(x)$validated

Run the code above in your browser using DataLab