% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data_preparation.R
\name{create_indicator_matrix}
\alias{create_indicator_matrix}
\title{Create Censoring Indicator Matrix}
\usage{
create_indicator_matrix(Y)
}
\arguments{
\item{Y}{A numeric matrix of dimensions \code{n x numTasks}, typically
produced by \code{\link{create_longitudinal_labels}}. May contain
\code{NA} values for censored observations.}
}
\value{
A numeric matrix of the same dimensions as \code{Y}.
  \code{1} = label is observed (known), \code{0} = label is censored
  (unknown).
}
\description{
Converts \code{NA} entries in a longitudinal label matrix (as produced
by \code{\link{create_longitudinal_labels}}) into a binary indicator
matrix. This indicator is used by \code{\link{orthoMTL}} to mask
censored observations in the loss computation.
}
\examples{
set.seed(42)
SurvTime <- rexp(10, rate = 0.1)
Event <- rbinom(10, 1, 0.7)
Y <- create_longitudinal_labels(SurvTime, Event, c(4, 6, 10))
W <- create_indicator_matrix(Y)
W   # 1 = observed, 0 = censored
}
\seealso{
\code{\link{create_longitudinal_labels}}
}
