cleanDataLASSO: Clean LASSO data

Description Usage Arguments Value

Description

Cleans the training data for glmnet, which requires a model matrix instead of a formula

Usage

1
2
cleanDataLASSO(trainset, lasso_vars, lasso_factors = NULL,
  testset = NULL, new_vars_lasso = NULL)

Arguments

trainset

The training dataset

lasso_vars

Predictor variables to use in the LASSO model

lasso_factors

Which predictor variables need to be converted to factors

testset

Optional test set; included so that both cleaned versions will have the same dimensions

new_vars_lasso

Optional variable names to include as input

Value

A list, containing cleaned versions of the trainset and testset


joeornstein/SRP documentation built on May 11, 2019, 3:13 p.m.