% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/screener.R
\name{screen.glmnet}
\alias{screen.glmnet}
\title{GLMNET (Lasso) Screening}
\usage{
screen.glmnet(
  time,
  event,
  X,
  obsWeights = NULL,
  alpha = 1,
  minscreen = 2,
  nfolds = 10,
  nlambda = 100,
  ...
)
}
\arguments{
\item{time}{Observed follow-up time.}

\item{event}{Observed event indicator.}

\item{X}{Training covariate data.frame.}

\item{obsWeights}{Observation weights.}

\item{alpha}{Penalty exponent (1 = lasso).}

\item{minscreen}{Minimum number of covariates to return. Defaults to 2.}

\item{nfolds}{Number of CV folds.}

\item{nlambda}{Number of penalty parameters.}

\item{...}{Additional ignored arguments.}
}
\value{
A logical vector of the same length as the number of columns in \code{X},
indicating which variables passed the screening algorithm (\code{TRUE} to keep,
\code{FALSE} to drop).
}
\description{
GLMNET (Lasso) Screening
}
\examples{
if (requireNamespace("glmnet", quietly = TRUE)) {
  data("metabric", package = "SuperSurv")
  dat <- metabric[1:40, ]
  x_cols <- grep("^x", names(dat))[1:5]
  X <- dat[, x_cols, drop = FALSE]

  screen.glmnet(
    time = dat$duration,
    event = dat$event,
    X = X,
    alpha = 1,
    minscreen = 2,
    nfolds = 3,
    nlambda = 20
  )
}
}
