\inputencoding{utf8}
\HeaderA{get.cov.matrix}{Computation of the Covariance Matrix}{get.cov.matrix}
\keyword{method}{get.cov.matrix}
%
\begin{Description}\relax
\code{get.cov.matrix} is a secondary function called during estimation runs by 
\code{fitmle.cov}. It computes the covariance matrix for the parameter
estimates. \code{get.cov.matrix} is typically not called directly by users.
\end{Description}
%
\begin{Usage}
\begin{verbatim}
  get.cov.matrix(problem = NULL,
                 Fit = NULL)
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{problem}] A list containing the following levels:\begin{description}

\item[data] A list containing as many levels as there are treatment levels 
for the subject (or population) being evaluated, plus the \code{trts} 
level listing all treatments for this subject (or population), and the 
\code{id} level giving the identification number of the subject (or set to
1 if the analysis was run at the level of the population.

Each treatment-specific level is a list containing the following levels: 
\begin{description}

\item[cov] mij x 3 data.frame containing the times of observations of the
dependent variables (extracted from the TIME variable), the indicators
of the type of dependent variables (extracted from the CMT variable),
and the actual dependent variable observations (extracted from the 
DV variable) for this particular treatment.
\item[cov] mij x c data.frame containing the times of observations of 
the dependent variables (extracted from the TIME variable) and all the
covariates identified for this particular treatment.
\item[bolus] bij x 4 data.frame providing the instantaneous inputs 
for a treatment and individual.
\item[infusion] fij x (4+c) data.frame providing the zero-order inputs for
a treatment and individual.
\item[trt] the particular treatment identifier.
\end{description}


\item[method] A character string, indicating the scale of the analysis. Should
be 'population' or 'subject'.
\item[init] A data.frame of parameter data with the following columns:
'names', 'type', 'value', 'isfix', 'lb', and 'ub'.
\item[debugmode] Logical indicator of debugging mode.
\item[modfun] Model function.

\end{description}


\item[\code{Fit}] A list of containing the following levels:\begin{description}

\item[estimations] The vector of final parameter estimates.
\item[fval] The minimal value of the objective function.

\end{description}


\end{ldescription}
\end{Arguments}
%
\begin{Value}
Return a list with the following elements: \begin{description}

\item[covmatrix] The matrix of covariance for the parameter estimates.
\item[orderedestimations] A data.frame with the same structure as
\code{problem\$init} but only containing the sorted estimated estimates.
The sorting is performed by \code{order.param.list}.

\end{description}

\end{Value}
%
\begin{Author}\relax
Sebastien Bihorel (\email{sb.pmlab@gmail.com})
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{fitmle.cov}{fitmle.cov}}
\end{SeeAlso}
