lpo_auc: Compute the leave-pair-out cross-validation estimator of AUC.

Description Usage Arguments Examples

View source: R/auc_functions.R

Description

This estimator is computed by leaving out a pair of one case (Y = 1) and one control (Y = 0). The learner is trained on the remaining observations and predicted values are obtained for the left-out pair. The estimate is given by the proportion of left-out pairs for which the case had higher predicted risk than the control.

Usage

1
2
lpo_auc(Y, X, learner = "glm_wrapper", max_pairs = NULL,
  parallel = FALSE, ...)

Arguments

Y

A numeric vector of outcomes, assume to equal 0 or 1.

X

A data.frame of variables for prediction.

learner

A wrapper that implements the desired method for building a prediction algorithm. See TODO: ADD DOCUMENTATION FOR WRITING

max_pairs

The maximum number of pairs to leave out.

parallel

A boolean indicating whether prediction algorithms should be trained in parallel. Default to FALSE.

...

Other options (not currently used)

Examples

1
2
3
4
5
# simulate data
X <- data.frame(x1 = rnorm(50))
Y <- rbinom(50, 1, plogis(X$x1))
# compute lpo_auc for logistic regression
lpo <- lpo_auc(Y = Y, X = X, learner = "glm_wrapper")

benkeser/predtmle documentation built on May 20, 2019, 5:41 p.m.