Description Usage Arguments Value Examples
Helper function that calculates risk preferences from individuals observed lottery choice.
1 2 3 4 5 6 7 8 9 10 11 12 | calc_rp(
utility_function,
lottery_choice,
lottery_probs_1,
lottery_probs_2,
lottery_payoffs_1,
lottery_payoffs_2,
rp_ub,
rp_lb,
rp_resolution,
initial_wealth
)
|
utility_function |
a character vector representing the utility function to use for deriving the risk preferences. The only current option is "crra". |
lottery_choice |
a numeric value representing the observed lottery choice of the survey respondent |
lottery_probs_1 |
a numerical vector representing the probabilities of the first outcome occurring in each lottery |
lottery_probs_2 |
a numerical vector representing the probabilities of the second outcome occurring in each lottery |
lottery_payoffs_1 |
a numerical vector representing the payoffs if the first outcome occurs in each lottery |
lottery_payoffs_2 |
a numerical vector representing the payoffs if the second outcome occurs in each lottery |
rp_ub |
a numerical value representing the lower bound to consider for the risk preference coefficient. |
rp_lb |
a numerical value representing the upper bound to consider for the risk preference coefficient. |
rp_resolution |
a numeric value representing the resolution to use for identifying risk preferences. For example, a value of .01, will search the risk preference parameter space in 0.01 increments. This value can be adjusted to speed up computation if fine resolution is not required.#' |
initial_wealth |
a numerical value representing the initial wealth to use for each respondent |
returns adjusted risk preferences
1 2 3 4 5 6 7 8 9 10 11 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.