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

Description Usage Arguments Details Value Examples

Description

In general, the function passed to y_weight_control$cv_risk should expect a list of outcomes and predictions in validation folds, in addition to a list called y_weight that contains the outcome weights (computed in the training sample) corresponding to this validation fold and any other information needed by y_weight_control$cv_risk (e.g., anything needed to compute confidence intervals). The function should return a list with names cv_measure, ci_low, ci_high, p_value, and ic. 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. The ic slot can be left empty, but is needed for post-hoc computation of variable importance measures.

Usage

1
cv_risk_y_auc(input, y_weight_control)

Arguments

input

A list where each entry corresponds to a validation fold. Each entry is a list with entries: Y (matrix of outcomes for this validation fold), pred (matrix of super learner predictions for each outcomes with columns corresponding to different outcomes).

y_weight_control

Composite outcome weight control options.

Details

In this case, the confidence intervals are computed using the cvAUC.ci_withIC. 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.

Value

List with named components cv_measure (cross-validated AUC), ci_low (lower 100(1 - y_weight_control$alpha)% CI), ci_high (upper 100(1 - y_weight_control$alpha)% CI), p_value (p-value of test of null hypothesis that cvAUC = 0.5).

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# simulate data with proper format
input <- list(list(Y = cbind(rbinom(50,1,0.5), rbinom(50,1,0.5)), 
                   pred = cbind(runif(50,0,1), runif(50,0,1)),
                   y_weight = list(weight = c(0, 1), ybar=0.5)),
              list(Y = cbind(rbinom(50,1,0.5), rbinom(50,1,0.5)),
                   pred = cbind(runif(50,0,1), runif(50,0,1)),
                   y_weight = list(weight = c(0, 1), ybar=0.5)))
                   
# linear combination of outcomes       
y_weight_control <- list(ensemble_fn = "ensemble_linear")    

# get risk
cv_risk <- cv_risk_y_auc(input, y_weight_control)               

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