% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate.tna}
\alias{simulate.tna}
\title{Simulate Data from a Transition Network Analysis Model}
\usage{
\method{simulate}{tna}(
  object,
  nsim = 1,
  seed = NULL,
  max_len = 100L,
  na_range = c(0L, 0L),
  zero_row = "self",
  format = "wide",
  ...
)
}
\arguments{
\item{object}{A \code{tna} object. The edge weights must be transition
probabilities or frequencies, i.e., the model must have
\code{type = "relative"} or \code{type = "frequency"}.}

\item{nsim}{An \code{integer} giving the number of sequences to simulate.
The default is 1.}

\item{seed}{an object specifying if and how the random number
    generator should be initialized (\sQuote{seeded}).\cr
    For the \code{"lm"} method, either \code{NULL} or an integer that will be
    used in a call to \code{set.seed} before simulating the response
    vectors.  If set, the value is saved as the \code{"seed"} attribute
    of the returned value.  The default, \code{NULL} will not change the
    random generator state, and return \code{\link{.Random.seed}} as the
    \code{"seed"} attribute, see \sQuote{Value}.
  }

\item{max_len}{An \code{integer} giving the maximum length of the simulated
sequences. When no missing values are generated, this is the length of
all simulated sequences.}

\item{na_range}{An \code{integer} vector of length 2 giving the minimum and
maximum number of missing values to generate for each sequence. The number
of missing values is drawn uniformly from this range. If both values are
zero (the default), no missing values are generated.}

\item{zero_row}{A \code{character} string describing how to process zero rows
in the weight matrix. The option \code{"self"} (the default) assigns
probability 1 to the corresponding state (self loop) and option
\code{"uniform"} assigns a uniform distribution.}

\item{format}{A \code{character} string indicating whether the data should be
returned in \code{wide} or \code{long} format.}

\item{...}{Ignored.}
}
\value{
A \code{data.frame} of the simulated sequence data.
}
\description{
Simulate Data from a Transition Network Analysis Model
}
\examples{
model <- tna(group_regulation)
sim <- simulate(model, nsim = 10, max_len = 10)

}
\seealso{
Other data: 
\code{\link{import_data}()},
\code{\link{import_onehot}()},
\code{\link{list_random_state_pools}()},
\code{\link{prepare_data}()},
\code{\link{print.tna_data}()},
\code{\link{random_group_tna}()},
\code{\link{random_tna}()},
\code{\link{random_tna_mmm}()},
\code{\link{simulate.group_tna}()}
}
\concept{data}
