\inputencoding{utf8}
\HeaderA{scarabee.analysis}{Run a scaRabee Analysis}{scarabee.analysis}
\keyword{method}{scarabee.analysis}
%
\begin{Description}\relax
\code{scarabee.analysis} is the \emph{de facto} gateway for running any kind 
of analysis with \pkg{scaRabee}. All other functions distributed with this
package are secondary functions called directly or indirectly by
\code{scarabee.analysis}.

Arguments for \code{scarabee.analysis} are best defined using the template
distributed with the package.

\end{Description}
%
\begin{Usage}
\begin{verbatim}
  scarabee.analysis(files = NULL,
                    method = 'population',
                    runtype = NULL,
                    debugmode = FALSE,
                    estim.options = NULL,
                    npts = NULL,
                    alpha = NULL,
                    solver.options = list(method='lsoda'))
\end{verbatim}
\end{Usage}
%
\begin{Arguments}
\begin{ldescription}
\item[\code{files}] A list of input used for the analysis. The following elements are
expected and none of them could be null: \begin{description}

\item[data] A .csv file located in the working directory, which contains
the dosing information, the observations of the dependent variable(s)
to be modeled, and possibly covariate information. The expected format 
of this file is described in details in \code{vignette('scaRabee',
        package='scaRabee')}.
\item[param] A .csv file located in the working directory, which contains
the initial guess(es) for the model parameter(s) to be optimized or used
for model simulation. The expected format of this file is described in
details in \code{vignette('scaRabee',package='scaRabee')}.
\item[model] A text file located in the working directory, which defines 
the model. Models specified with explicit, ordinary or delay 
differential equations are expected to respect a certain syntax and 
organization detailed in \code{vignette('scaRabee',package='scaRabee')}.


\end{description}


\item[\code{method}] A character string, indicating the scale of the analysis. Should
be 'population' or 'subject'.
\item[\code{runtype}] A character string, indicating the type of analysis. Should be
'simulation', 'estimation', or 'gridsearch'.
\item[\code{debugmode}] A logical value, indicating the debug mode should be turn on
(\code{TRUE}) or off (default). Used only for estimation runs. If turn on,
the user could have access to error message returned when the model and
residual variability are evaluated in \code{fitmle} before the likelihood
is computed.
\item[\code{estim.options}] A list of estimation options containing two elements
\code{maxiter} (the maximum number of iterations) and \code{maxeval} (the
maximum number of function evaluations).
\item[\code{npts}] Only necessary if \code{runtype} is set to 'gridsearch'; \code{npts} 
represents the number of points to be created by dimension of the grid 
search.
\item[\code{alpha}] Only necessary if \code{runtype} is set to 'gridsearch'; 
\code{alpha} is a real number, representing the factor applied to the 
initial estimates of the model parameters to determine the lower and upper 
bounds to the grid search space.
\item[\code{solver.options}] A list of differential equation solver options. 
Currently not modifiable by users.
\end{ldescription}
\end{Arguments}
%
\begin{Value}
Run an analysis until completion. See 
\code{vignette('scaRabee',package='scaRabee')} for more details about the
expected outputs for an estimation, a simulation, or a gird search run.
\end{Value}
%
\begin{Author}\relax
Sebastien Bihorel (\email{sb.pmlab@gmail.com})
\end{Author}
%
\begin{SeeAlso}\relax
\code{\LinkA{fitmle}{fitmle}}
\end{SeeAlso}
