\HeaderA{RtreemixSim-class}{Class "RtreemixSim"}{RtreemixSim.Rdash.class}
\aliasA{getModel}{RtreemixSim-class}{getModel}
\aliasA{getModel,RtreemixSim-method}{RtreemixSim-class}{getModel,RtreemixSim.Rdash.method}
\aliasA{initialize,RtreemixSim-method}{RtreemixSim-class}{initialize,RtreemixSim.Rdash.method}
\aliasA{noDraws}{RtreemixSim-class}{noDraws}
\aliasA{noDraws,RtreemixSim}{RtreemixSim-class}{noDraws,RtreemixSim}
\aliasA{noDraws,RtreemixSim-method}{RtreemixSim-class}{noDraws,RtreemixSim.Rdash.method}
\aliasA{print,RtreemixSim-method}{RtreemixSim-class}{print,RtreemixSim.Rdash.method}
\aliasA{SamplingMode,RtreemixSim}{RtreemixSim-class}{SamplingMode,RtreemixSim}
\aliasA{SamplingMode,RtreemixSim-method}{RtreemixSim-class}{SamplingMode,RtreemixSim.Rdash.method}
\aliasA{SamplingParam,RtreemixSim}{RtreemixSim-class}{SamplingParam,RtreemixSim}
\aliasA{SamplingParam,RtreemixSim-method}{RtreemixSim-class}{SamplingParam,RtreemixSim.Rdash.method}
\aliasA{SamplingTimes}{RtreemixSim-class}{SamplingTimes}
\aliasA{SamplingTimes,RtreemixSim-method}{RtreemixSim-class}{SamplingTimes,RtreemixSim.Rdash.method}
\aliasA{show,RtreemixSim-method}{RtreemixSim-class}{show,RtreemixSim.Rdash.method}
\aliasA{SimPatterns}{RtreemixSim-class}{SimPatterns}
\aliasA{SimPatterns,RtreemixSim-method}{RtreemixSim-class}{SimPatterns,RtreemixSim.Rdash.method}
\aliasA{WaitingTimes}{RtreemixSim-class}{WaitingTimes}
\aliasA{WaitingTimes,RtreemixSim-method}{RtreemixSim-class}{WaitingTimes,RtreemixSim.Rdash.method}
\keyword{classes}{RtreemixSim-class}
\begin{Description}\relax
This class contains data simulated from the \code{RtreemixModel} it
extends together with their sampling and waiting times. It also
includes the sampling mode and the sampling parameter used for the time simulation.
\end{Description}
\begin{Section}{Objects from the Class}
Objects can be created by calls of the form \code{new("RtreemixSim",
    Model, SimPatterns, SamplingMode, SamplingParam, WaitingTimes,
    SamplingTimes)}.
The \code{RtreemixSim} class specifies patterns (\code{RtreemixData})
simulated from the parent \code{RtreemixModel} together with their
waiting and sampling times resulting from the waiting time simulation
along the branchings in the parent model.

The \code{Model} is an \code{RtreemixModel} object used in the data
and time simulation process. In other words, this model is used for
simulating patterns with their sampling and waiting times.

The \code{SimPatterns} is an \code{RtreemixData} object that contains
the patterns simulated from the given \code{Model}.

The \code{SamplingMode} is a \code{character} that specifies the
sampling mode ("constant" or "exponential") used in the time simulations.

The \code{SamplingParam} is a \code{numeric} that specifies the
sampling parameter corresponding to the sampling mode given by
\code{SamplingMode}.

The \code{WaitingTimes} is a numeric \code{vector} that specifies the
waiting times for the simulated patterns. Its length equals the number
of patterns in \code{SimPatterns}.

The \code{SamplingTimes} is a numeric \code{vector} that specifies the
sampling times for the simulated patterns. Its length equals the number
of patterns in \code{SimPatterns}.
\end{Section}
\begin{Section}{Slots}
\describe{
\item[\code{SimPatterns}:] Object of class \code{"RtreemixData"}.
\item[\code{SamplingMode}:] Object of class \code{"character"}. It
can have one of the two possible values: "constant" or "exponential".
\item[\code{SamplingParam}:] Object of class \code{"numeric"}.
\item[\code{WaitingTimes}:] Object of class \code{"numeric"}. The
length of \code{WaitingTimes} must be equal to the number
of patterns in \code{SimPatterns}.
\item[\code{SamplingTimes}:] Object of class \code{"numeric"}. The
length of \code{SamplingTimes} must be equal to the number
of patterns in \code{SimPatterns}.
}
\end{Section}
\begin{Section}{Extends}
Class \code{"RtreemixModel"}, directly.
Class \code{"RtreemixData"}, by class "RtreemixModel", distance 2.
\end{Section}
\begin{Section}{Methods}
\describe{
\item[SamplingMode] \code{signature(object = "RtreemixSim")}: A
method for obtaining the sampling mode ("constant" or
"exponential") used for the time simulations.
\item[SamplingParam] \code{signature(object = "RtreemixSim")}: A
method for obtaining the sampling parameter corresponding to the
specified \code{SamplingMode}.
\item[SamplingTimes] \code{signature(object = "RtreemixSim")}: A
method used for obtaining the sampling times of the patterns
in \code{SimPatterns}.
\item[SimPatterns] \code{signature(object = "RtreemixSim")}: A
method used for obtaining the patterns simulated from the parent model.
\item[WaitingTimes] \code{signature(object = "RtreemixSim")}: A
method used for obtaining the waiting times of the patterns
in \code{SimPatterns}.
\item[getModel] \code{signature(object = "RtreemixSim")}: A method
for obtaining the mixture model used in the simulations.
\item[noDraws] \code{signature(object = "RtreemixSim")}: A method
for obtaining the number of simulated patterns, i.e. the size of \code{SimPatterns}.
}
\end{Section}
\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{RtreemixGPS-class}{RtreemixGPS.Rdash.class}}, \code{\LinkA{RtreemixData-class}{RtreemixData.Rdash.class}},
\code{\LinkA{RtreemixModel-class}{RtreemixModel.Rdash.class}},
\code{\LinkA{fit-methods}{fit.Rdash.methods}}, \code{\LinkA{sim-methods}{sim.Rdash.methods}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
## Generate a random RtreemixModel object with 3 components and 9 genetic events.
rand.mod <- generate(K = 3, no.events = 9, noise.tree = TRUE, prob = c(0.2, 0.8))
show(rand.mod)

## Create an RtreemixSim object by simulating patterns with their sampling and waiting times from a given mixture model.
sim.data <- sim(model = rand.mod, sampling.mode = "exponential", sampling.param = 1, no.sim = 200)
show(sim.data)

## See the slots from the RtreemixSim object.
SimPatterns(sim.data)
SamplingMode(sim.data)
SamplingParam(sim.data)
WaitingTimes(sim.data)
SamplingTimes(sim.data)
## See model.
getModel(sim.data)
## See number of simulated patterns.
noDraws(sim.data)
\end{ExampleCode}
\end{Examples}

