Simulate data based on a model and parameter distributions
a design dataset. See example
A function with the first argument the simulation design, i.e. a dataset with the columns ... The second argument to this function is a dataset with parameters for every individual. This can be supplied by the user, or generated by this sim_data if theta and omega_mat are supplied.
vector of fixed effect parameters
vector of between subject random effects, specified as lower triangle
A character vector linking the parameters in the model to the variables in the dataset. See example.
parameter values
draw between subject random effects?
see example
number of simulations to perform
a vector of simulated dependent variables (for us in the VPC plotting function)
This function generates the simulated dependent values for use in the VPC plotting function.