Function to simulate a given DDModel

Sim_DDModel(model = NULL, trials = 1000L, simulations = 1L, parameter = NULL)

Arguments

model

DDModel object to be used in the simulation.

trials

integer specifying the number of trials per condition.

simulations

integer specifying the number of simulations

parameter

Data.frame containing parameters that should be simulated

Value

DDRep object or list of DDRep depending on the input

Details

If 'parameter' is specified the function will undergo nrow(parameter) times simulation calls. Depending on the input the return value will be either a DDRep, list or list of lists.

Examples

# Define a Model M1 <- DDModel(model="DSTP",task = "flanker", CDF_perc = c(0.1,0.3,0.5,0.7,0.9),CAF_perc = c(0.0,0.2,0.4,0.6,0.8,1.0)) # Simulate some Data with randomly generated parameters in the domain of M1 R1 <- Sim_DDModel(M1,10000L) # If you want to reuse the randomly drawn parameters (or any other) simply insert them R2 <- Sim_DDModel(M1,10000L,parameter = R1@PAR)