Description Usage Arguments Value Examples
View source: R/estimate_bandit2arm.R
This function performs parameter estimation to recover behavior from the simulated task data.
1 | estimate_bandit2arm(data = bandit2arm_data, method = "mle", plot = TRUE)
|
data |
simulated two-armed bandit task data |
method |
parameter estimation technique used; either maximum-likelihood estimation (mle), maximum a posteriori (map) or expectation-maximization with laplace approximation (eml). Defaults to mle. |
plot |
visualize estimation performance between true parameters vs estimated parameters. Defaults to TRUE. |
A plot illustrating the correlation between the true parameters and estimated parameters, and a list containing a dataframe of the true and estimated parameter values, the correlation value of parameter 1, and the correlation value of parameter 2.
1 2 3 4 5 | # Save simulated task data to a variable, say, bandit2arm_data
bandit2arm_data <- simulated_bandit2arm(trials.unique = TRUE)
# Recover behavioral parameters using maximum-likelihood estimation (MLE)
estimate_bandit2arm(data = bandit2arm_data, method = "mle", plot=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.