grridgeCV {GRridge} | R Documentation |
Returns the cross-validated predictions for a grridge
logistic, linear or Cox regression.
grridgeCV(grr, highdimdata, response, outerfold = length(response), fixedfolds = TRUE, recalibrate=FALSE)
grr |
List. Output of GRridge function. |
highdimdata |
Matrix or numerical data frame. Contains the primary data of the study. Columns are samples, rows are variables (features). |
response |
Factor, numeric, binary or survival. Response values. The number of response values should equal |
outerfold |
Integer. Fold used for cross-validation loop. |
fixedfolds |
Boolean. Use fixed folds for cross-validation? |
recalibrate |
Boolean. Should the prediction model be recalibrated on the test samples? Only implemented for logistic and linear regression with only penalized covariates. |
This convenience function returns cross-validated predictions from grridge
, including those from
ordinary (logistic) ridge regression. It can be used to compute ROC-curves. About recalibrate
: this option allows to compare recalibrated models, but only if the test sample size is large enough. See
predict.grridge
For linear and logistic regression: A matrix containing the predictions. The first column contains the sample indices, the second the prediction by ordinary ridge, the third the predictions by group-regularized ridge, the fourth (optional) the predictions by group-regularized ridge plus selection. Finally, it may contain predictions by lasso and/or a regression model with unpenalized covariates only. For Cox regression: a list with three components. First, a matrix with the linear predictions, in the same format as above. Second, a list of survival probability matrices (one for each prediction model), the rows of which indicate the individuals and the columns indicate the observed times. Third, a vector with the observed times.
Mark A. van de Wiel
Mark van de Wiel, Tonje Lien, Wina Verlaat, Wessel van Wieringen, Saskia Wilting. (2016). Better prediction by use of co-data: adaptive group-regularized ridge regression. Statistics in Medicine, 35(3), 368-81.
For logistic regression: ROC-curves: roc
. AUC: auc
.
GRridge: link{grridge}
.
# load data objects data(dataFarkas) # In this example, we provide one partition only # see "CreatePartition" for examples in creating multiple partitions firstPartition <- CreatePartition(CpGannFarkas) # the optimum lambda2 is provided in this example # worth to try: # grFarkas <- grridge(datcenFarkas,respFarkas,firstPartition,monotone=FALSE) # grFarkas$optl # grFarkas <- grridge(datcenFarkas,respFarkas, optl=5.680087, firstPartition,monotone=FALSE) ### # grFarkasCV <- grridgeCV(grFarkas,datcenFarkas,respFarkas,outerfold=10)