\HeaderA{distribution-methods}{Method for generating the (scaled) probablility distribution
induced with a given mutagenetic trees mixture model}{distribution.Rdash.methods}
\aliasA{distribution}{distribution-methods}{distribution}
\aliasA{distribution,RtreemixModel,character,numeric,numeric-method}{distribution-methods}{distribution,RtreemixModel,character,numeric,numeric.Rdash.method}
\aliasA{distribution,RtreemixModel,missing,missing,missing-method}{distribution-methods}{distribution,RtreemixModel,missing,missing,missing.Rdash.method}
\keyword{methods}{distribution-methods}
\keyword{distribution}{distribution-methods}
\begin{Description}\relax
These functions generate the probability distribution induced with a
given mutagenetic trees mixture model \code{model} on the space of all possible
patterns of genetic events. The \code{model} has to be specified. The
sampling mode and the parameters for the sampling times of the observed
input and output probabilities are optional. The number of genetic
events in the \code{model} cannot exceed 30.
\end{Description}
\begin{Usage}
\begin{verbatim}
## S4 method for signature 'RtreemixModel, missing,
##   missing, missing':
distribution(model, sampling.mode, sampling.param, output.param)
## S4 method for signature 'RtreemixModel, character,
##   numeric, numeric':
distribution(model, sampling.mode,
sampling.param, output.param)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{model}] An \code{RtreemixModel} object that encodes a
probability distribution on the set of all possible patterns.
\item[\code{sampling.mode}] A \code{character} that specifies the
sampling mode ("constant" or "exponential") for the observed input
and output probabilities.
\item[\code{sampling.param}] A \code{numeric} that specifies the
sampling parameter for the observed input probabilities
corresponding to the sampling mode given by \code{sampling.mode}.
\item[\code{output.param}] A \code{numeric} that specifies the
sampling parameter for the observed output probabilities
corresponding to the sampling mode given by \code{sampling.mode}.
\end{ldescription}
\end{Arguments}
\begin{Value}
The function returns a \code{dataframe} of all possible patterns with their
corresponding probabilities derived from the specified trees mixture
model. When the sampling mode and the sampling parameters (input and
output) are specified their values are printed out.
\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{RtreemixModel-class}{RtreemixModel.Rdash.class}}, \code{\LinkA{fit-methods}{fit.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Generate a random RtreemixModel object with 3 components.
mod <- generate(K = 3, no.events = 8, noise.tree = TRUE, prob = c(0.2, 0.8))
show(mod)

## See the probability distribution encoded by the model on the set of all possible patterns.
distr <- distribution(model = mod)
distr

## Get the probabilities.
distr$probability

## See the probability distribution encoded by the model on the set of all possible patterns
## calculated for given sampling mode, and corresponding input and output parameters.
distr1 <- distribution(model = mod, sampling.mode = "exponential", sampling.param = 1, output.param = 1)
distr1
\end{ExampleCode}
\end{Examples}

