% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BinomialModel.R
\name{CalculatePref}
\alias{CalculatePref}
\title{Calculate Performance Metrics}
\usage{
CalculatePref(model, newx, s, acture.y)
}
\arguments{
\item{model}{Fitted glmnet model.}

\item{newx}{New data matrix for prediction.}

\item{s}{Lambda value for prediction.}

\item{acture.y}{Actual binary outcomes.}
}
\value{
ROCR performance object containing TPR and FPR values.
}
\description{
Computes True Positive Rate (TPR) and False Positive Rate (FPR) for ROC
analysis using the ROCR package. Used internally for ROC curve generation.
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE) &&
  requireNamespace("ROCR", quietly = TRUE)) {
  fitted_model <- glmnet::cv.glmnet(matrix(rnorm(100), ncol = 2), rbinom(50, 1, 0.5), nfolds = 3)
  perf <- CalculatePref(fitted_model, matrix(rnorm(20), ncol = 2), "lambda.min", rbinom(10, 1, 0.5))
}
}
