First solve the model inside Matlab with code documented here: https://fanwangecon.github.io/PrjOptiSNW/ from the paper Nygaard, Sorernsen and Wang (2020) (https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3839890). This model generates for households with varying income level, kids count, and marital status, the marginal propensity to consume different check increments, and consumption without stimulus checks. Also generates life-time value/welfare in the absence and with stimulus checks. This function then solves the optimal allocation problem given these inputs.

Various parameters here determine the path to the csv file where simulation results are stored/outputted from matlab, and various variable names in the files, various allocation constraints on how much a household with certain child count and marital status can receive in terms of stimulus checks, and parameters relating to planner preferences.

ffp_snw_process_inputs(
 
    srt_simu_path = "C:/Users/fan/Documents/Dropbox (UH-ECON)/PrjNygaardSorensenWang/Output/",
  snm_simu_csv = "snwx_v_planner_moredense_a100zh266_e2m2.csv",
  df_plan_v_tilde_full = NULL,
  fl_max_phaseout = 238000,
  it_bin_dollar_before_phaseout = 2500,
  fl_percheck_dollar = 100,
  fl_multiple = 58056,
  it_max_checks = 44,
  fl_tax_hh = 128580000,
  bl_per_capita = FALSE,
  it_max_age = 64,
  it_min_age = 18,
  it_age_bins = 2,
  fl_rand_adj_A_prop = 0,
  it_rand_adj_A_rng_seed = 0,
  ar_svr_csv = c("age", "marital", "kids", "checks", "ymin", "mass", "survive",
    "vtilde", "ctilde"),
  ar_svr_groups = c("marital", "kids", "age_group", "ymin_group"),
  ar_svr_groups_stats = c("mass", "survive"),
  svr_checks = "checks",
  svr_v_value = "vtilde",
  svr_c_value = "ctilde",
  svr_mass = "mass",
  ar_rho = c(1),
  bl_df_alloc_il = FALSE,
  bl_return_allQ_V = FALSE,
  bl_threshold = FALSE,
  ls_stimulus_specs = list(st_biden_or_trump = "bidenchk", it_check_headorspouse = 12,
    it_check_perkids = 5),
  bl_given_firstcheck = FALSE,
  bl_non_inc_adjust = FALSE,
  bl_print = TRUE,
  bl_print_verbose = FALSE
)

Arguments

bl_per_capita

boolean per capita or not. If per capita, then household size will determine the weight to assign to each household. The consumptions should be divded by the household size, and the weights should be expanded by it. For example, if two households, 1 with 2 members, 1 with 1 member. Then then consumption in the larger household should first be divided by two. Then the weight should be 2/3 for the larger household, and 1/3 for the smaller household.

fl_rand_adj_A_prop

float a number larger than zero, it is the standard deviation of the shock to be drawn to perturb the entire vector for A/alpha, moving it up or down. If equal to zero, no effects.

it_rand_adj_A_rng_seed

random number seed for simulating perturbation draws

Author

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