Predictions on Test Data with Grpreg
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.
grpregPredict(Xy, trainFrac = 2/3, XyList=NULL)
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. |
vector of RMSEs
grpregPredict(mcdonald)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.