cv_risk_sl_auc: Cross-validated area under the receiver operating...

Description Usage Arguments Details Examples

Description

In general, the function passed to sl_control$cv_risk should expect a list of outcomes and predictions in validation folds. The function should return a list with names cv_measure, ci_low, ci_high, and p_value. The output of this function is returned irrespective of the names of the list; however, the names are necessary for print methods to work properly.

Usage

1
cv_risk_sl_auc(input, sl_control)

Arguments

input

List where each entry corresponds to a validation fold. Each entry is a list with entries: Y (univariate outcome for this validation fold), pred (matrix of predictions from learner and columns correspond to different learner).

sl_control

List of super learner control options.

Details

In this case, the confidence intervals are computed using the cvAUC::cvAUC.ci function from the cvAUC package. The p-value is for the one-sided hypothesis test that cross-validated AUC equals 0.5 against the alternative that it is greater than 0.5.

Examples

1
2
3
4
5
6
7
8
9
# simulate data with proper format
input <- list(list(valid_folds=1, Y = rbinom(50,1,0.5), pred = rbinom(50,1,0.5)),
              list(valid_folds=2, Y = rbinom(50,1,0.5), pred = rbinom(50,1,0.5))) 
     
# alpha value                        
sl_control= list(alpha= 0.05)    

# get risk 
cv_risk <- cv_risk_sl_r2(input, sl_control)   

benkeser/cvma documentation built on May 5, 2019, 1:37 p.m.