\Header{formula.pdMat}{Extract pdMat Formula}
\keyword{models}{formula.pdMat}
\begin{Description}\relax
This method function extracts the formula associated with a
\code{pdMat} object, in which the column and row names are specified.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S3 method for class 'pdMat':
formula(x, asList, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] an object inheriting from class \code{pdMat}, representing
a positive definite matrix.
\item[\code{asList}] logical.  Should the asList argument be applied to each
of the components?  Never used.
\item[\code{...}] some methods for this generic require additional
arguments.  None are used in this method.
\end{ldescription}
\end{Arguments}
\begin{Value}
if \code{x} has a \code{formula} attribute, its value is
returned, else \code{NULL} is returned.
\end{Value}
\begin{Note}\relax
Because factors may be present in \code{formula(x)}, the
\code{pdMat} object needs to have access to a data frame where the
variables named in the formula can be evaluated, before it can resolve
its row and column names from the formula.
\end{Note}
\begin{Author}\relax
Jose Pinheiro \email{Jose.Pinheiro@pharma.novartis.com} and Douglas Bates \email{bates@stat.wisc.edu}
\end{Author}
\begin{SeeAlso}\relax
\code{\Link{pdMat}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
pd1 <- pdSymm(~Sex*age)
formula(pd1)
\end{ExampleCode}
\end{Examples}

