Description Usage Arguments Value Examples
View source: R/estimate_bandit2arm.R
This function runs the MAP technique to recover behavior from the simulated task data.
1 2 3 4 5 6 7 8 9 | map_bandit2arm(
data = bandit2arm_data,
param = list(init.x1, init.x2),
prior.mean = c(0, 0),
prior.sd = c(5, 5),
fn = "map.objectiveFunction",
opt = "TRM",
nRes = 5
)
|
data |
simulated two-armed bandit data |
param |
randomly generated initial parameters. |
prior.mean |
mean priors for x1 and x2, respectively. Defaults to mean 0 for both parameters. |
prior.sd |
standard deviation priors for x1 and x2, respectively. Defaults to 5 for both parameters. |
fn |
objective function being minimized |
opt |
optimization algorithm used. Defaults to trust-region method (trm) |
nRes |
number of restarts. Defaults to 5. |
A list containing the sum log-likelihood, map estimates of parameter 1 per subject, map estimates of parameter 2 per subject, laplace values of parameter 1 per subject, laplace values of parameter 2 per subject.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.