% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PrognosticModel.R
\name{PrognosticAUC}
\alias{PrognosticAUC}
\title{Calculate Time-Dependent AUC for Survival Models}
\usage{
PrognosticAUC(model, newx, s, acture.y)
}
\arguments{
\item{model}{A fitted survival model object capable of generating risk scores.}

\item{newx}{A matrix or data frame of new data for prediction.}

\item{s}{Lambda value for prediction. Can be numeric or `"lambda.min"`/`"lambda.1se"`.}

\item{acture.y}{Data frame with `time` and `status` columns.}
}
\value{
A data frame with AUC values at 30th (`probs.3`) and 90th (`probs.9`) percentiles.
}
\description{
Evaluates prognostic ability of a survival model by calculating time-dependent AUC
at the 30th and 90th percentiles of survival time. These thresholds assess
short-term and long-term predictive accuracy.
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE) &&
  requireNamespace("survival", quietly = TRUE) &&
  requireNamespace("timeROC", quietly = TRUE)) {
  library(survival)
  set.seed(123)
  x <- matrix(rnorm(100 * 5), ncol = 5)
  y <- Surv(rexp(100), rbinom(100, 1, 0.5))
  fit <- glmnet::cv.glmnet(x, y, family = "cox")
  acture_y <- data.frame(time = y[, 1], status = y[, 2])
  auc_results <- PrognosticAUC(fit, newx = x, s = "lambda.min", acture.y = acture_y)
}
}
\author{
Dongqiang Zeng
}
