BinomialAUC: Calculate Area Under the Curve (AUC) for Binomial Model

View source: R/BinomialModel.R

BinomialAUCR Documentation

Calculate Area Under the Curve (AUC) for Binomial Model

Description

This function computes the AUC for a binomial model's predictions on a given dataset. It uses the specified regularization strengths to generate predictions, which are then evaluated against actual outcomes to compute the AUC using the ROCR package. This function is typically used to assess model performance in classification tasks.

Usage

BinomialAUC(model, newx, s, acture.y)

Arguments

model

A model object fitted using a binomial distribution, from which predictions will be generated.

newx

A matrix or data frame of new data on which to make predictions. This should correspond to the predictors used in fitting the model.

s

A character vector indicating the specific regularization strengths ('lambda.min' or 'lambda.1se') at which predictions should be evaluated.

acture.y

A vector containing the actual binary outcomes associated with 'newx'.

Value

A numeric value representing the AUC for the model's predictions against actual outcomes.

Examples

# Assuming 'model', 'newx', and 'actual.y' are predefined:
auc_value <- BinomialAUC(model = fitted_model, newx = test_data, s = "lambda.min", acture.y = test_outcomes)
print(auc_value)

IOBR/IOBR documentation built on July 16, 2025, 8:12 p.m.