mdr: Perform multifactor dimension reduction (MDR) on the data....

View source: R/dimension_reduction.R

mdrR Documentation

Perform multifactor dimension reduction (MDR) on the data. Uses cross-validation and an optional grid search on smoothers, as well as preprocessing for best results. Follows this tutorial: https://uc-r.github.io/naive_bayes

Description

Perform multifactor dimension reduction (MDR) on the data. Uses cross-validation and an optional grid search on smoothers, as well as preprocessing for best results. Follows this tutorial: https://uc-r.github.io/naive_bayes

Usage

mdr(df, X_cols, y_col, cv = 5, grid = FALSE, nrows = 1)

Arguments

df

(data.frame) NEBCS data

X_cols

(array<character>) column names for the explanatory variables

y_col

(character) column name for the response variable

cv

(integer) (default=5) number of cross-validation folds

grid

(bool) (default=FALSE) whether to perform a grid search on smoothers

nrows

(number) a float between 0 and 1 indicating the percentage of rows to randomly sample, or a number indicating the number of rows to sample

Value

(matrix) Pearson correlation matrix

Examples

cor_mat(df)

paulsavala/nebcs documentation built on March 20, 2022, 9:24 a.m.