View source: R/calc_eu_choice.R
Helper function that returns TRUE if expected utility suggests the same lottery choice that was choosen by the survey respondent.
1 2 3 4 5 6 7 8 9 | calc_eu_choice(
r,
lottery_probs_1,
initial_wealth,
lottery_payoffs_1,
lottery_probs_2,
lottery_payoffs_2,
lottery_choice
)
|
r |
a numerical value representing the risk preference parameter to test |
lottery_probs_1 |
a numerical vector representing the probabilities of the first outcome occurring in each lottery |
initial_wealth |
a numerical value representing the initial wealth to use for each respondent |
lottery_payoffs_1 |
a numerical vector representing the payoffs if the first outcome occurs in each lottery |
lottery_probs_2 |
a numerical vector representing the probabilities of the second outcome occurring in each lottery |
lottery_payoffs_2 |
a numerical vector representing the payoffs if the second outcome occurs in each lottery |
lottery_choice |
a numeric value representing the observed lottery choice of the survey respondent |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.