% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/screener.R
\name{screen.rfsrc}
\alias{screen.rfsrc}
\title{Random Survival Forest Screening Algorithm}
\usage{
screen.rfsrc(
  time,
  event,
  X,
  obsWeights = NULL,
  minscreen = 2,
  ntree = 100,
  ...
)
}
\arguments{
\item{time}{Numeric vector of observed follow-up times.}

\item{event}{Numeric vector of event indicators (1 = event, 0 = censored).}

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

\item{obsWeights}{Numeric vector of observation weights.}

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

\item{ntree}{Integer. Number of trees to grow. Defaults to 100 for fast screening.}

\item{...}{Additional arguments passed to \code{\link[randomForestSRC]{rfsrc}}.}
}
\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{
This screening algorithm uses the \code{randomForestSRC} package to select covariates
based on their Variable Importance (VIMP). It grows a fast forest and retains features
with a VIMP greater than zero.
}
\examples{
if (requireNamespace("randomForestSRC", 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.rfsrc(
    time = dat$duration,
    event = dat$event,
    X = X,
    minscreen = 2,
    ntree = 10
  )
}
}
