Description Usage Arguments Details Value Examples
Simulate stochastic responses either for one subject or multiple subjects.
The simulation is based on the model
object. For one subject, the
user must supply true parameters, p.vector
at ps
argument.
For multiple subjects, the user can supply a matrix (or a row vector),
indicating true parameters for each subject, separately on each row
(via ps
argument). This is the fixedeffect model. If the user
wants to simulate from a randomeffect (i.e., hierarchical) model, in which
case p.prior must be supplied and ps will be ignored. Note in some cases,
a randomeffect model may fail to draw data from the model, because
true parameters are drawn from p.prior
and a specific model, like
DDM, may has certain ranges from different parameters.
1 2 3 
object 
a model object. 
nsim 
number of trials/responses. 
seed 
an integer specifying if and how the random number generator should be initialized. 
nsub 
number of subjects 
prior 
parameter priors. A list of distributions based on which
the true parameters fro each subject are drawn. It is usually created by

ps 
p.vector matrix. Each row represent a subject. 
... 
additional optional arguments. 
ps
can be a row vector, in which case each subject has identical
parameters. It can also be a matrix with one row per subject, in which
case it must have ns
rows. The true values will be saved as
"parameters" attribute.
a data frame
1 2 3 4 5 6 7 8 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.