computePsAuc: Compute the area under the ROC curve

Description Usage Arguments Details Value Examples

View source: R/PsFunctions.R

Description

Compute the area under the ROC curve of the propensity score.

Usage

1
computePsAuc(data, confidenceIntervals = FALSE)

Arguments

data

A data frame with at least the two columns described below

confidenceIntervals

Compute 95 percent confidence intervals (computationally expensive for large data sets)

Details

The data frame should have a least the following two columns:

Value

A tibble holding the AUC and its 95 percent confidence interval

Examples

1
2
3
4
5
treatment <- rep(0:1, each = 100)
propensityScore <- c(rnorm(100, mean = 0.4, sd = 0.25), rnorm(100, mean = 0.6, sd = 0.25))
data <- data.frame(treatment = treatment, propensityScore = propensityScore)
data <- data[data$propensityScore > 0 & data$propensityScore < 1, ]
computePsAuc(data)

escott12/CohortMethod documentation built on Dec. 20, 2021, 6:37 a.m.