Simulate data using a DEFM

sim_defm(m, par, fill_t0 = TRUE)

Arguments

m

An object of class DEFM. The baseline model.

par

Numeric vector of model parameters.

fill_t0

Logical scalar. When TRUE (default) will fill-in the baseline value of each observation (i.e., the starting condition) (see details.)

Value

An integer vector of size nrows_defm(m) x ncol_defm_y(m).

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.