\HeaderA{cluster}{Identify clusters.}{cluster}
\keyword{survival}{cluster}
\begin{Description}\relax
This is a special function used in the context of survival models.  It 
identifies correlated groups of observations, and is used on the right hand 
side of a formula.
Using \code{cluster()} in a formula implies that
robust sandwich variance estimators are desired.
\end{Description}
\begin{Usage}
\begin{verbatim}
cluster(x)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] A character, factor, or numeric variable. 

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The function's only action is semantic, to mark a variable as the 
cluster indicator.
The resulting variance is what is known as the ``working independence''
variance  in a GEE model.
\end{Details}
\begin{Value}
\code{x}
\end{Value}
\begin{SeeAlso}\relax
\code{\LinkA{coxph}{coxph}},  \code{\LinkA{survreg}{survreg}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
marginal.model <- coxph(Surv(time, status) ~ rx + cluster(litter), rats)
frailty.model  <- coxph(Surv(time, status) ~ rx + frailty(litter), rats)
\end{ExampleCode}
\end{Examples}

