\HeaderA{compareFits}{Compare Fitted Objects}{compareFits}
\aliasA{print.compareFits}{compareFits}{print.compareFits}
\keyword{models}{compareFits}
\begin{Description}\relax
The columns in \code{object1} and \code{object2} are put together in
matrices which allow direct comparison of the individual elements for
each object. Missing columns in either object are replaced by
\code{NA}s.
\end{Description}
\begin{Usage}
\begin{verbatim}
compareFits(object1, object2, which)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object1,object2}] data frames, or matrices, with the same
row names, but possibly different column names. These will usually
correspond to coefficients from fitted objects with a grouping
structure (e.g. \code{lme} and \code{lmList} objects).
\item[\code{which}] an optional integer or character vector indicating which
columns in \code{object1} and \code{object2} are to be used in the
returned object. Defaults to all columns.
\end{ldescription}
\end{Arguments}
\begin{Value}
a three-dimensional array, with the third dimension given by the number
of unique column names in either \code{object1} or \code{object2}. To
each column name there corresponds a matrix with as many rows as the
rows in \code{object1} and two columns, corresponding to \code{object1}
and \code{object2}. The returned object inherits from class
\code{compareFits}.
\end{Value}
\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{\LinkA{plot.compareFits}{plot.compareFits}},
\code{\LinkA{pairs.compareFits}{pairs.compareFits}},
\code{\LinkA{comparePred}{comparePred}},
\code{\LinkA{coef}{coef}},
\code{\LinkA{random.effects}{random.effects}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
fm1 <- lmList(Orthodont)
fm2 <- lme(fm1)
compareFits(coef(fm1), coef(fm2))
\end{ExampleCode}
\end{Examples}

