Learn R Programming

tna (version 1.3.1)

simulate: Simulate Method (Re-export of stats::simulate)

Description

The stats::simulate() generic is re-exported so that the simulate.tna() and simulate.group_tna() methods provided by this package are dispatched correctly when the user only loads tna. See the method-specific help pages for argument and return details.

Usage

simulate(object, nsim = 1, seed = NULL, ...)

Value

The value returned by the dispatched method (a data.frame of simulated sequences for tna and group_tna objects). See the method-specific help pages for details.

Arguments

object

A statistical model object. The tna package provides methods for objects of class tna and group_tna.

nsim

An integer giving the number of sequences to simulate.

seed

An integer random seed for reproducibility, or NULL.

...

Further arguments passed to the dispatched method.

Examples

Run this code
model <- tna(group_regulation)
sim <- simulate(model, nsim = 5, max_len = 10)

Run the code above in your browser using DataLab