\Header{strata}{Identify Strata Variables}
\keyword{survival}{strata}
\begin{Description}\relax
This is a special function used in the context of the Cox survival model.
It identifies stratification variables when they appear on the right hand
side of a formula.
\end{Description}
\begin{Usage}
\begin{verbatim}
strata(..., na.group=FALSE, shortlabel=FALSE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{...}] any number of variables.  All must be the same length.

\item[\code{na.group}] a logical variable, if \code{TRUE}, then missing values are treated as a
distinct level of each variable.

\item[\code{shortlabel}] if \code{TRUE} omit variable names from resulting
factor labels
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The result is identical to the \code{interaction} function,
but for the labeling of the factors (\code{strata} is more verbose).
\end{Details}
\begin{Value}
a new factor, whose levels are all possible combinations of the factors
supplied as arguments.
\end{Value}
\begin{SeeAlso}\relax
\code{\Link{coxph}},\code{\Link{interaction}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
a<-factor(rep(1:3,4))
b<-factor(rep(1:4,3))
levels(strata(a))
levels(strata(a,b,shortlabel=TRUE))
data(ovarian)
coxph(Surv(futime, fustat) ~ age + strata(rx), data=ovarian)
\end{ExampleCode}
\end{Examples}

