

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

	\paragraph{Syntax}

\begin{verbatim}
S = stats(Pos,Theta,...)
S = stats(Pos,Theta,LogPost,...)
S = stats(Pos,FName,...)
\end{verbatim}

\paragraph{Input arguments}

\begin{itemize}
\item
  \texttt{Pos} {[} poster {]} - Posterior simulator object that has
  generated the \texttt{Theta} chain.
\item
  \texttt{Theta} {[} numeric {]} - MCMC chain generated by the
  \href{poster/arwm}{\texttt{poster/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.
\item
  \texttt{FName} {[} char {]} - File name under which the simulated
  chain was saved when \href{poster/arwm}{\texttt{poster/arwm}} was run
  with options \texttt{saveEvery=}' and \texttt{'saveAs='}.
\end{itemize}

\paragraph{Output arguments}

\begin{itemize}
\itemsep1pt\parskip0pt\parsep0pt
\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{'mddGrid='} {[} numeric \textbar{} \emph{\texttt{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{'progress='} {[} \texttt{true} \textbar{}
  \emph{\texttt{false}} {]} - Display progress bar in the command
  window.
\end{itemize}

\paragraph{Options to include/exclude output
statistics}

\begin{itemize}
\item
  \texttt{'bounds='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
  {]} - Include in \texttt{S} the lower and upper parameter bounds set
  up by the user.
\item
  \texttt{'chain='} {[} \emph{\texttt{true}} \textbar{} \texttt{false}
  {]} - Include in \texttt{S} the entire simulated chains of parameter
  values.
\item
  \texttt{'cov='} {[} \texttt{true} \textbar{} \emph{\texttt{false}} {]}
  - Include in \texttt{S} the sample covariance matrix.
\item
  `\texttt{hist=}' {[} numeric \textbar{} \emph{empty} {]} - Include in
  \texttt{S} histogram bins and counts with the specified number of
  bins.
\item
  \texttt{'hpdi='} {[} \emph{\texttt{false}} \textbar{} numeric {]} -
  Include in \texttt{S} the highest probability density intervals with
  the specified coverage.
\item
  \texttt{'ksdensity='} {[} \texttt{true} \textbar{}
  \emph{\texttt{false}} \textbar{} numeric {]} - Include in \texttt{S}
  the x- and y-axis points for kernel-smoothed posterior density; use a
  numeric value to control the number of points over which the density
  is computed.
\item
  \texttt{'mdd='} {[} \emph{\texttt{true}} \textbar{} \texttt{false} {]}
  - Include in \texttt{S} minus the log marginal data density.
\item
  \texttt{'mean='} {[} \emph{\texttt{true}} \textbar{} \texttt{false}
  {]} - Include in \texttt{S} the sample averages.
\item
  \texttt{'median='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
  {]} - Include in \texttt{S} the sample medians.
\item
  \texttt{'mode='} {[} \texttt{true} \textbar{} \emph{\texttt{false}}
  {]} - Include in \texttt{S} the sample modes based on histograms.
\item
  \texttt{'prctile='} {[} numeric \textbar{} \emph{empty} {]} - Include
  in \texttt{S} the specified percentiles.
\item
  \texttt{'std='} {[} \emph{\texttt{true}} \textbar{} \texttt{false} {]}
  - Include in \texttt{S} the sample std deviations.
\end{itemize}

\paragraph{Description}

\paragraph{Example}


