Learn R Programming

bestglm (version 0.37.3)

grpregPredict: Predictions on Test Data with Grpreg

Description

A dataframe is partitioned randomly into training and test samples. The function grpreg::grpreg() is used to fit the training data using Lasso, SCAD and MCP penalty functions. The BIC criterion is used to selecting the penalty parameter lambda.

Usage

grpregPredict(Xy, trainFrac = 2/3, XyList=NULL)

Arguments

Xy

a dataframe that may contain factor variables

trainFrac

the fraction of data to be used for training

XyList

instead of supplying Xy you can provide XyList.

Value

vector of RMSEs

See Also

glmnetPredict, glmnetGridTable, trainTestPartition, grpreg

Examples

Run this code
# NOT RUN {
grpregPredict(mcdonald)
# }

Run the code above in your browser using DataLab