% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PsFunctions.R
\name{computePsAuc}
\alias{computePsAuc}
\title{Compute the area under the ROC curve}
\usage{
computePsAuc(data, confidenceIntervals = FALSE, maxRows = 1e+05)
}
\arguments{
\item{data}{A data frame with at least the two columns described below}

\item{confidenceIntervals}{Compute 95 percent confidence intervals (computationally expensive for
large data sets)}

\item{maxRows}{Maximum number of rows to use. If the number of rows is larger, a random sample
will be taken. This can increase speed, with minor cost to precision. Set to 0
to use all data.}
}
\value{
A tibble holding the AUC and its 95 percent confidence interval
}
\description{
Compute the area under the ROC curve of the propensity score.
}
\details{
The data frame should have a least the following two columns:
\itemize{
\item treatment (integer): Column indicating whether the person is in the target (1) or comparator (0) group.
\item propensityScore (numeric): Propensity score.
}
}
\examples{
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)

}
