\HeaderA{tuneMD}{Generate tuning parameters for MD model}{tuneMD}
\keyword{iteration}{tuneMD}
\keyword{utilities}{tuneMD}
\begin{Description}\relax
An adaptive algorithm to generate tuning parameters for the MCMC 
algorithm implemented in \code{\LinkA{ei.MD.bayes}{ei.MD.bayes}}.  Since we are 
drawing each parameter one at a time, target acceptance rates are between 0.4 to 0.6.
\end{Description}
\begin{Usage}
\begin{verbatim}
tuneMD(formula, covariate = NULL, data, ntunes = 10, 
    totaldraws = 10000, ...)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{formula}] A formula of the form \code{cbind(col1, col2, ...) \textasciitilde{} cbind(row1, row2, ...)} with rows as the predictor and columns 
as the response
\item[\code{covariate}] An R formula for the optional covariate in the form
\code{\textasciitilde{} x}
\item[\code{data}] data frame containing the variables specified in \code{formula} and
\code{covariate}
\item[\code{ntunes}] number of times to iterate the tuning algorithm
\item[\code{totaldraws}] number of iterations for each tuning run
\item[\code{...}] additional arguments passed to \code{\LinkA{ei.MD.bayes}{ei.MD.bayes}}
\end{ldescription}
\end{Arguments}
\begin{Value}
A list containing matrices of tuning parameters.
\end{Value}
\begin{Author}\relax
Olivia Lau \textless{}\email{olivia.lau@post.harvard.edu}\textgreater{}
\end{Author}
\begin{SeeAlso}\relax
\code{\LinkA{ei.MD.bayes}{ei.MD.bayes}}
\end{SeeAlso}

