\HeaderA{lambda.MD}{Calculate shares using data from MD model}{lambda.MD}
\keyword{models}{lambda.MD}
\begin{Description}\relax
Calculates the population share of row members in a
particular column as a proportion of the total number of row members in the selected subset of columns.
\end{Description}
\begin{Usage}
\begin{verbatim}
lambda.MD(object, columns, ret.mcmc = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{object}] an R object of class \code{eiMD}, output from \code{\LinkA{ei.MD.bayes}{ei.MD.bayes}}
\item[\code{columns}] a character vector of column names to be included in
calculating the shares
\item[\code{ret.mcmc}] a logical value indicating how the samples from the posterior 
should be returned.  If \code{TRUE} (default), samples are returned as \code{mcmc} 
objects.  If \code{FALSE}, samples are returned as arrays. 
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
This function allows users to define subpopulations within the
data and calculate the proportion of individuals within each of the
columns that defines that subpopulation.  For example, if the model
includes the groups Democrat, Republican, and Unaffiliated, the
argument \code{columns = c(``Democrat", ``Republican")} will calculate
the two-party shares of Democrats and Republicans for each row.
\end{Details}
\begin{Value}
Returns either a ((\eqn{R}{} * included columns) \eqn{\times}{}
samples) matrix as an \code{mcmc} object or a (\eqn{R \times}{}
included columns \eqn{\times}{} samples) array.
\end{Value}
\begin{Author}\relax
Michael Kellermann \textless{}\email{kellerm@post.harvard.edu}\textgreater{} and 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}

