\HeaderA{likelihoods-methods}{Method for predicting the likelihoods of a set of samples with
respect to a mutagenetic trees mixture model}{likelihoods.Rdash.methods}
\aliasA{likelihoods}{likelihoods-methods}{likelihoods}
\aliasA{likelihoods,RtreemixModel,RtreemixData-method}{likelihoods-methods}{likelihoods,RtreemixModel,RtreemixData.Rdash.method}
\keyword{methods}{likelihoods-methods}
\begin{Description}\relax
This function predicts the (log, weighted) likelihoods of the samples in a given
dataset according to a given mutagenetic trees mixture model. The
dataset and the model have to be specified.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S4 method for signature 'RtreemixModel, RtreemixData':
likelihoods(model, data)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] An \code{RtreemixModel} object specifying the
probabilistic framework in which the likelihoods of the genetic
patterns are computed.
\item[\code{data}] An \code{RtreemixData} object giving the samples for
which the likelihoods are to be calculated.
\end{ldescription}
\end{Arguments}
\begin{Value}
This method returns an \code{RtreemixStats} object that containes the
weghted- and log-likelihoods of the samples in the given dataset with
respect to the given mutagenetic trees mixture model.
\end{Value}
\begin{Author}\relax
Jasmina Bogojeska
\end{Author}
\begin{References}\relax
Learning multiple evolutionary pathways from cross-sectional
data, N. Beerenwinkel et al.
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{RtreemixData-class}{RtreemixData.Rdash.class}}, \code{\LinkA{RtreemixModel-class}{RtreemixModel.Rdash.class}},
\code{\LinkA{fit-methods}{fit.Rdash.methods}}, \code{\LinkA{distribution-methods}{distribution.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Create an RtreemixData object from a randomly generated RtreemixModel object.
rand.mod <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob = c(0.2, 0.8))
data <- sim(model = rand.mod, no.draws = 300)
show(data)

## Compute the likelihoods of the samples in data with respect to the model rand.mod
mod.stat <- likelihoods(model = rand.mod, data = data)
show(mod.stat)
\end{ExampleCode}
\end{Examples}

