

    \filetitle{stats}{Evaluate selected statistics of an MCMC chain}{poster/stats}

	\paragraph{Syntax}
 
 \begin{verbatim}
 S = stats(POS,THETA,...)
 S = stats(POS,THETA,LOGPOST,...)
 \end{verbatim}
 \paragraph{Input arguments}
 
 \begin{itemize}
 \item
   \texttt{POS} {[} poster {]} - Posterior simulator, \texttt{poster},
   object used to generate the \texttt{THETA} chain.
 \item
   \texttt{THETA} {[} numeric {]} - MCMC chain generated by the
   \texttt{arwm} function.
 \item
   \texttt{LOGPOST} {[} numeric {]} - Vector of log posterior densities
   generated by the \texttt{arwm} function; \texttt{LOGPOST} is not
   necessary if you do not request \texttt{'mdd'}, the marginal data
   density.
 \end{itemize}
 \paragraph{Output arguments}
 
 \begin{itemize}
 \item
   \texttt{S} {[} struct {]} - Struct with the statistics requested by
   the user.
 \end{itemize}
 \paragraph{Options}
 
 \begin{itemize}
 \item
   \texttt{'estTime='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
   {]} - Display and update the estimated time to go in the command
   window.
 \item
   \texttt{'histBins='} {[} numeric \textbar{} \emph{10} {]} - Number of
   histogram bins if \texttt{'hist'} is in the \texttt{'output'} option.
 \item
   \texttt{'hpdiCover='} {[} numeric \textbar{} \emph{90} {]} - Requested
   percent coverage of the highest probability density interval if
   \texttt{'hpdi'} is in the \texttt{'output'} option.u
 \item
   \texttt{'mddGrid='} {[} numeric \textbar{} \emph{0.1:0.1:0.9} {]} -
   Points between 0 and 1 over which the marginal data density estimates
   will be averaged, see Geweke (1999).
 \item
   \texttt{'output='} {[} char \textbar{} cellstr {]} - List of output
   statistics.
 \item
   \texttt{'progress='} {[} \texttt{true} \textbar{}
   \emph{\texttt{false}} {]} - Display progress bar in the command
   window.
 \item
   \texttt{'prctile='} {[} numeric \textbar{} \emph{{[}10,90{]}} {]} -
   Requested percentiles if \texttt{'prctile'} is in the
   \texttt{'output'} option.
 \end{itemize}
 \paragraph{Description}
 
 List of available statistics:
 
 ---Overall statistics
 
 \begin{itemize}
 \item
   \texttt{'cov='} --- Covariance matrix of the parameter estimates.
 \item
   \texttt{'mdd='} --- Minus the log marginal data density.
 \end{itemize}
 ---Parameter-specific statistics
 
 \begin{itemize}
 \item
   \texttt{'chain='} - The entire simulated chain of parameter values
 \item
   \texttt{'mean='} - Average.
 \item
   \texttt{'std='} - Std deviation.
 \item
   \texttt{'median='} - Median.
 \item
   \texttt{'mode='} - Mode based on the histogram function outputs.
 \item
   \texttt{'hpdi='} - Highest probability density interval with coverage
   given by the option \texttt{'hpdi'}.
 \item
   \texttt{'hist='} - Histogram bins and counts, with the number of bins
   \texttt{'histbins'}.
 \item
   \texttt{'ksdensity='} - The x- and y-axis points for kernel-smoothed
   posterior density.
 \item
   \texttt{'bounds='} - Lower and upper bounds set up by the user.
 \item
   \texttt{'prctile='} - Percentiles given by the option
   \texttt{'prctile'}.
 \end{itemize}
 \paragraph{Example}


