Description Usage Arguments Value Examples
View source: R/simulate_twochoiceRL.R
This function allows users to simulate behavior of n_subj
individuals
performing a two-choice task.
1 2 3 4 5 6 7 8 9 10 11 |
seed_value |
user-specified random value that ensures replication of results. Defaults to 528. |
n_subj |
number of subjects. Defaults to 100. |
n_tr |
number of trials. Defaults to 200. |
mean_x |
mean of the distribution that we are sampling from for the re-parameterized parameters. Defaults to 1 and 0 for x1 and x2, respectively. |
stdev_x |
standard deviation of the distribution that we are sampling from for the re-parameterized parameters. Defaults to 1 and 1 for x1 and x2, respectively. |
mean_payoff |
mean payoff for both choices. Defaults to 1 and -1 for choice 1 and choice 2, respectively. |
stdev_payoff |
standard deviation payoff for both choices. Defaults to 2 and 2 for choice 1 and choice 2, respectively. |
trials_unique |
keep only the unique trials where an individual made a choice. Defaults to TRUE. |
progress_bar |
track completion time of estimation. Defaults to TRUE. |
A list containing a list of the two-choice dataset for each subject, the number of simulated subjects, the 'true' values for re-parameterized parameter 1 (x1) and parameter 2 (x2) for each subject. The dataset contains the trial number (Trial), the expected value (Value), the choice probability (Pr), the presented stimulus (Option), the chosen stimulus (Action), and the given reward (Reward).
1 2 3 4 5 | # Simulate 100 subjects performing 200 trials of a two-choice decision task
data_sim <- simulate_twochoiceRL(n_subj = 100, n_tr = 200)
# View behavioral data of subject 100
View(data_sim$twochoiceRL[[100]])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.