% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datagen-interface.R
\name{covar_categorical}
\alias{covar_categorical}
\title{Categorical covariate definition}
\usage{
covar_categorical(name, probs, labels = NULL)
}
\arguments{
\item{name}{Column name in the generated data.}

\item{probs}{Numeric vector of category probabilities (must sum to 1).}

\item{labels}{Optional character vector of level labels. Length must equal
\code{length(probs)}. Defaults to \code{"1"}, \code{"2"}, ...}
}
\value{
A named list suitable as one element of the \code{covariates} argument.
}
\description{
Builds a multi-level categorical covariate definition list.
}
\examples{
covar_categorical("stage", probs = c(0.4, 0.35, 0.25),
                  labels = c("I", "II", "III"))

}
\seealso{
\code{\link{covar_continuous}}, \code{\link{covar_binary}},
\code{\link{rmst.sim}}
}
