After solving for optimal allocating queue, at each Q point, which corresponds to different level of aggregate resources available, show the value given optimal choices this is an array of values, at each Q point. Potentially output for all Q. Or only show this for all queue points up to the actual resource limit, D_Wbin_il = 1.

This version of the function is adpated specially for Nygaard, Sorensen, and Wang (2021) for the optimal allocation of stimulus checks paper, and is based on ffp_opt_sodis_value().

ffp_nsw_opt_sodis_value(
  fl_rho,
  df_queue_il,
  bl_return_allQ_V = FALSE,
  bl_return_inner_V = FALSE,
  svr_id_i = "id_i",
  svr_id_il = "id_il",
  svr_D_il = "D_il",
  svr_inpalc = "Q_il",
  svr_D_Wbin_il = "D_Wbin_il",
  svr_A_il = "A_il",
  svr_alpha_il = "alpha_il",
  svr_beta_i = "beta_i",
  svr_measure_i = NA,
  svr_betameasure_i = NA,
  svr_V_cumu_l = "V_sum_l",
  svr_V_inner_Q_il = "V_inner_Q_il",
  svr_V_star_Q_il = "V_star_Q_il"
)

Arguments

bl_return_allQ_V

boolean if true returns value along the entire allocation queue including queue segments after resource limits. This is more time consuming when set to true.

svr_beta_i

string variable name for planner bias

svr_measure_i

string NO LONGER USED variable name for mass for this type of recipient, default NA mass of recipient is the measure of recipient of this type in the population. This measure does not impact relative ranking optimal allocation across types, but determines how much to push individual types further along the allocation queue back. this should be 'mass_i', representing the measure of individuals in this group

svr_betameasure_i

string variable name for the weight considerating both mass and beta jointly, can not simply multiply beta and measure together. Suppose two people, beta is 0.5 for each person. And then we have 0.5 mass for each person, simply multiplying the two together genreates 0.5x0.5 vs 0.5x0.5, don't sum up to the existing total mass even.

Author

Fan Wang, http://fanwangecon.github.io