View source: R/model_selection.R
get_design_mat | R Documentation |
Format data table to produce a design matrix.
get_design_mat( data, var_names = NULL, corr_cutoff = 0.75, corr_method = c("spearman", "pearson"), check_binary_vars = T, strings_as_factors = T )
data |
A data frame of potential explanatory variables for the design matrix. Rows should be records and columns should be variables. |
var_names |
A vector of column names from |
corr_cutoff |
A numeric value in 0,1 denoting the absolute correlation cutoff to classify pairs of collinear variables. |
corr_method |
A string indicating the type of correlation to use for determining
collinearity. Must be |
check_binary_vars |
A boolean indiciating if dichotomous variables should be included in the collinearity pruning. |
strings_as_factors |
A boolean indiciating if character variables should be converted to factors in the returned data frame. |
Creates a design matrix and prunes variables with no variance. Removes pairwise collinear variables.
A data frame of explanatory variables for regression.
get_residual_matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.