% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BinomialModel.R
\name{PlotAUC}
\alias{PlotAUC}
\title{Plot AUC ROC Curves}
\usage{
PlotAUC(
  train.x,
  train.y,
  test.x,
  test.y,
  model,
  modelname,
  cols = NULL,
  palette = "jama"
)
}
\arguments{
\item{train.x}{Training predictors matrix.}

\item{train.y}{Training outcomes (binary factor).}

\item{test.x}{Testing predictors matrix.}

\item{test.y}{Testing outcomes (binary factor).}

\item{model}{Fitted cv.glmnet model.}

\item{modelname}{Character string for plot title.}

\item{cols}{Optional color vector for ROC curves.}

\item{palette}{Color palette name from IOBR palettes. Default is `"jama"`.}
}
\value{
ggplot object of ROC curves.
}
\description{
Generates ROC curves for model evaluation comparing training and testing
performance at both lambda.min and lambda.1se. Creates a ggplot visualization
with AUC values in the legend.
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE)) {
  set.seed(123)
  train_data <- matrix(rnorm(100 * 5), ncol = 5)
  train_outcome <- rbinom(100, 1, 0.5)
  test_data <- matrix(rnorm(50 * 5), ncol = 5)
  test_outcome <- rbinom(50, 1, 0.5)
  fitted_model <- glmnet::cv.glmnet(train_data, train_outcome, family = "binomial", nfolds = 5)
  p <- PlotAUC(train_data, train_outcome, test_data, test_outcome, fitted_model, "MyModel")
  print(p)
}
}
