Simulate data using a DEFM
sim_defm(m, par, fill_t0 = TRUE)
An integer vector of size nrows_defm(m) x ncol_defm_y(m)
.
An object of class DEFM. The baseline model.
Numeric vector of model parameters.
Logical scalar. When TRUE
(default) will fill-in the baseline
value of each observation (i.e., the starting condition) (see details.)
Each observation in the simulation must have initial condition. In practice,
this means we start the markov process with a matrix of size
morder_defm(m) x ncol_defm_y(m)
, i.e., order of the Markov process times
the number of output variables. when fill_t0 = TRUE
, the function return
the rows corresponding to baseline states with the original value, otherwise
it replaces them with -1. This option is mostly for testing purposes.