Skip to contents

Base-R alias for posterior_predict(): each simulation is one posterior predictive replicate at the training data. A categorical fit (tulpa_multinomial(), tulpa_ordinal()) simulates factor columns carrying the response levels.

Usage

# S3 method for class 'tulpa_fit'
simulate(object, nsim = 1, seed = NULL, ...)

Arguments

object

A tulpa_fit object.

nsim

Number of simulated datasets (default 1).

seed

Optional integer seed (RNG state is restored on exit).

...

Ignored.

Value

A data frame with nsim columns (sim_1, ...), one row per observation, following the stats::simulate() convention: its "seed" attribute is the value of seed (with the RNG kind as attribute "kind") when one was given, else the state of .Random.seed before simulation.