generate_sim_data {RegDDM} | R Documentation |
Generate simulated binary decision data using DDM
Description
This function generates a simulated dataset under different configurations
It can be used to test the performance and functionality of RegDDM.
The outcome variable is y
, which is influenced by different variables.
Usage
generate_sim_data(
N = 30,
n_each = 100,
n_xvar = 2,
beta_0 = 0,
beta_c1 = 0,
beta_c2 = 0,
beta_v_0 = 0,
beta_v_x1 = 0,
beta_v_x2 = 0,
sigma_y = 1,
sigma_v = 0,
y_family = "gaussian"
)
Arguments
N |
Number of subjects. |
n_each |
Number of trials per subject |
n_xvar |
Number of trial-level variables influencing drift rate |
beta_0 |
Intercept |
beta_c1 |
Slope of c1 |
beta_c2 |
Slope of c2 |
beta_v_0 |
Slope of v_0 |
beta_v_x1 |
Slope of v_x1 |
beta_v_x2 |
Slope of v_x2 |
sigma_y |
Standard deviation of error term of y, Only used when
|
sigma_v |
Contaminant level for drift rate v. |
y_family |
Family of distribution of y. Can be either "gaussian", "bernoulli" or "poisson" |
Value
A named list with four elements. data1_true
and
data2_true
are true values of DDM parameters of each subject and
trial. data1
and data2
removed those hidden variables.
Examples
sim_data = generate_sim_data()
sim_data$data1
sim_data$data2
[Package RegDDM version 1.1 Index]