% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GendataIC.R
\name{GendataIC}
\alias{GendataIC}
\title{Generate Simulation Data for Interval-Censored Screening}
\usage{
GendataIC(
  n,
  p,
  rho,
  model = c("linear", "poisson", "cox"),
  balanced = TRUE,
  censoring = 1L,
  seed = NULL
)
}
\arguments{
\item{n}{Number of subjects (rows of the design matrix).}

\item{p}{Number of predictors (columns of the design matrix).}

\item{rho}{AR(1) correlation between adjacent latent predictors.
Must satisfy \eqn{0 \le \rho < 1}.}

\item{model}{Character string specifying the model for the latent response.
One of \code{"linear"}, \code{"poisson"}, or \code{"cox"}.
\describe{
  \item{\code{"linear"}}{Linear model \eqn{Y^* = \mathbf{x}^\top\boldsymbol\beta + \epsilon},
    \eqn{\epsilon \sim N(0,1)}.}
  \item{\code{"poisson"}}{Poisson regression with
    \eqn{\log\lambda = \mathbf{x}^\top\boldsymbol\beta},
    \eqn{\boldsymbol\beta = (1, 0.8, 0.6, \mathbf{0}_{15}^\top, -0.6, -0.8,
    \mathbf{0}_{p-20}^\top)^\top}.}
  \item{\code{"cox"}}{Cox proportional hazards with Weibull baseline
    (shape = 2, scale = 0.15) and
    \eqn{\boldsymbol\beta = (1.2, 1, 0.8, \mathbf{0}_{15}^\top, -1, -1.2,
    \mathbf{0}_{p-20}^\top)^\top}.}
}}

\item{balanced}{Logical.  If \code{TRUE} (default), predictors are
dichotomized at the median (\eqn{X_k = I(X^*_k > 0)}), yielding
approximately equal group sizes.  If \code{FALSE}, the 70th percentile
of \eqn{N(0,1)} is used as the threshold, producing imbalanced
(sparse) binary predictors.}

\item{censoring}{Integer 1 or 2 selecting the censoring scenario:
\describe{
  \item{\code{1}}{(default) \eqn{(p_I, p_R, p_L) = (80\%, 14\%, 6\%)}.}
  \item{\code{2}}{\eqn{(p_I, p_R, p_L) = (80\%, 6\%, 14\%)}.}
}}

\item{seed}{Optional integer seed passed to \code{set.seed()} for
reproducibility.  \code{NULL} (default) leaves the RNG state unchanged.}
}
\value{
A list with three elements:
  \describe{
    \item{\code{X}}{An \eqn{n \times p} binary integer matrix of predictors.}
    \item{\code{L}}{Numeric vector of length \eqn{n}: lower interval bounds.
      Left-censored observations have \code{L = -Inf}.}
    \item{\code{R}}{Numeric vector of length \eqn{n}: upper interval bounds.
      Right-censored observations have \code{R = Inf}.}
  }
}
\description{
Generates ultrahigh-dimensional simulation data for evaluating feature
screening methods under Case II interval censoring, following the
data-generating framework of the Log-rank SIS paper.
The true active predictor set is fixed at \eqn{\mathcal{D} = \{1,2,3,19,20\}}.

Binary predictors are obtained by dichotomizing a latent Gaussian vector
with Toeplitz covariance \eqn{\Sigma_{jk} = \rho^{|j-k|}}.  The latent
response \eqn{Y^*} is generated from one of three models (linear, Poisson,
or Cox), and interval-censored observations \eqn{(Y^L_i, Y^U_i]} are
produced by adding asymmetric random noise to \eqn{Y^*_i}.
}
\examples{
## Linear model, balanced predictors, censoring scenario 1
data <- GendataIC(n = 100, p = 500, rho = 0.5,
                  model = "linear", balanced = TRUE,
                  censoring = 1, seed = 2025)
X <- data$X; L <- data$L; R <- data$R
cat("Dimensions: n =", nrow(X), "  p =", ncol(X), "\n")
cat("Right-censored:", sum(is.infinite(R)), "\n")
cat("Left-censored: ", sum(is.infinite(L)), "\n")

## Poisson model, imbalanced predictors, censoring scenario 2
data2 <- GendataIC(n = 100, p = 500, rho = 0.2,
                   model = "poisson", balanced = FALSE,
                   censoring = 2, seed = 42)

## Cox model
data3 <- GendataIC(n = 100, p = 500, rho = 0.5,
                   model = "cox", balanced = TRUE, seed = 1)

}
\references{
Fan, J. and Lv, J. (2008). Sure independence screening for ultrahigh
dimensional feature space.
\emph{Journal of the Royal Statistical Society: Series B},
\strong{70}(5), 849--911.

Zhong, W., Qian, C., Liu, W., Zhu, L., and Li, R. (2023). Feature
screening for interval-valued response with application to study
association between posted salary and required skills.
\emph{Journal of the American Statistical Association},
\strong{118}, 805--817.
}
