% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BinomialModel.R
\name{RegressionResult}
\alias{RegressionResult}
\title{Regression Result Computation}
\usage{
RegressionResult(train.x, train.y, test.x, test.y, model)
}
\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 object.}
}
\value{
List containing:
\describe{
  \item{model}{The fitted cv.glmnet model}
  \item{coefs}{Data frame with feature names and coefficients at lambda.min and lambda.1se}
  \item{AUC}{Matrix of AUC values for train/test sets at both lambda values}
}
}
\description{
Computes regression results with coefficients at lambda.min and lambda.1se,
and evaluates AUC for binomial outcomes. Returns a comprehensive summary
of model performance on both training and testing datasets.
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE)) {
  set.seed(123)
  train_data <- matrix(rnorm(100 * 10), ncol = 10)
  train_outcome <- rbinom(100, 1, 0.5)
  test_data <- matrix(rnorm(50 * 10), ncol = 10)
  test_outcome <- rbinom(50, 1, 0.5)
  fitted_model <- glmnet::cv.glmnet(train_data, train_outcome, family = "binomial", nfolds = 5)
  results <- RegressionResult(
    train.x = train_data, train.y = train_outcome,
    test.x = test_data, test.y = test_outcome, model = fitted_model
  )
}
}
