grridgeCV: Returns the cross-validated predictions

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Returns the cross-validated predictions for a grridge logistic, linear or Cox regression.

Usage

1
2
grridgeCV(grr, highdimdata, response, outerfold = length(response),
           fixedfolds = TRUE, recalibrate=FALSE)

Arguments

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 ncol(highdimdata).

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.

Details

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

Value

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 next (optionally) the predictions by group-regularized ridge plus Elastic Net selection, possibly for multiple model sizes (as specified by the argument maxsel when using grridge). Finally, it may contain predictions by lasso and/or a regression model with unpenalized covariates only. For Cox regression: the relative hazard is returned, which equals the exponentiated linear predictor.

Author(s)

Mark A. van de Wiel

References

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.

See Also

For logistic regression: ROC-curves: roc. AUC: auc. GRridge: link{grridge}.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

GRridge documentation built on Nov. 8, 2020, 5:47 p.m.