Optimal Allocation Functions

Binary Optimal Allocation Functions

Allocate W units of resources among N individuals. Each i of N gets 0 or 1.

ffp_opt_sobin_target_row()

Theorem 1 and 2, solves the binary targeting queue with Ai_i, alpha_i, and planner preferences, for one individual

ffp_opt_anlyz_rhgin_bin()

Theorem 1, Binary Optimal Allocation solution, loop along a vector of planner inequality preference (rho)

ffp_opt_sobin_rev()

Theorem 1, Equation 6, Resource Equivalent Variation

Discrete Optimal Allocation Functions

Allocate W units of resources among N individuals. Each i of N gets some discrete units between individual minimum and maximum.

ffp_opt_anlyz_rhgin_dis()

Discrete Optimal Allocations, Queue, and Values

ffp_opt_sodis_value()

Value at each W point along Queue, for one planner rho, given optimal allocation

ffp_opt_sodis_rev()

Discrete Problem Resource Equivalent Variation

ffp_opt_anlyz_sodis_rev()

Discrete Problem Resource Equivalent Variation Multiple Rhos

Linear Bounded-Continuous Optimal Allocation Functions

Allocate W units of resources among N individuals. Each i of N gets some continuous amount below minimum and maximum

ffp_opt_solin_relow()

Theorem 1, Binary Optimal Allocation solution, for one planner inequality preference (one rho value)

ffp_opt_anlyz_rhgin()

Theorem 2, Bounded Linear Allocation solution, loop along a vector of planner inequality preference (rho)

Optimal Allocation of Stimulus Checks

Allocation files for Nygaard, Sorensen and Wang (2020) the optimal allocation of COVID-19 simulus checks.

ffp_snw_graph_feasible()

This is a support function that provides visualization for optimal allocation results.

ffp_snw_process_inputs()

Solving optimal allocation for Nygaard, Sorernsen and Wang (2020) given MPC and C simulation results.

ffp_snw_process_inputs_core()

Contains file processing components of ffp_snw_process_inputs function

ffp_snw_stimulus_checks_bush()

US Economic Recovery Act of 2008 Bush Stimulus Check amounts (tax-rebates) by household type and income array for Nygaard, Sorernsen and Wang (2021)

ffp_snw_stimulus_checks_bush_add2dfid()

Given dataframe solve for stimulus across household types and find relaxed policy bounds as defined by counterfactuals.

ffp_snw_tax_liability()

US 2008 Tax liability by household type given income for Nygaard, Sorernsen and Wang (2021)

ffp_nsw_opt_anlyz_rhgin_dis()

Discrete Optimal Allocations, Queue, and Values. NSW version.

ffp_nsw_opt_sodis_value()

Value at each W point along Queue, for one planner rho, given optimal allocation. NSW version.

Data

Simulated Data

Illustrative Testing

ffd_draw_n_alpha()

Generate N=2 Data for Discrete and Bounded Continuous Examples

Raw Datasets

Testing datasets

df_opt_birthwt

Test Dataset Birth Weight

df_opt_caschool

Test Dataset California Test Score Data

df_opt_nccrimes

Test Dataset North Carolina Crimes

df_opt_dtgch_aorig

Test Dataset Panel Height and Weight, Guatemala and Philippines, scrambled data, not actual.

df_opt_dtgch_cbem4

Test Dataset Panel Height and Weight, Philippines, scrambled data, not actual.

df_opt_lalonde_training

Test Dataset Job Training Effects Lalonde AER 1986

df_nsw_tiny_chk168_df_id

NSW Test Household ID file

Datasets with Optimal Allocation Results

Datset files with additional columns that store optimal allocation results or allocation space parameters

df_opt_dtgch_cbem4_rrlop

Optimal Linear Allocation based on dtgch cbem4 solved by solin relow

df_opt_dtgch_cbem4_rrlop_allrh

Optimal Linear Allocation based on dtgch cbem4 solved by solin relow, multiple rhos, collected

df_opt_dtgch_cbem4_rrlop_argin

Optimal Linear Allocation dtgch cbem4, solin relow, multiple rhos, GINI

df_opt_lalonde_training_employ

Lalonde AER 1986 with Wage Regression Allocation Queue

df_opt_lalonde_training_wage

Lalonde AER 1986 with Wage Regression Allocation Queue

df_opt_caschool_prep_i

Test Dataset California Test Score Data: PREP I Frame, Select Input and Estimation Dates

df_opt_caschool_input_ib

Test Dataset California Test Score Data: IB Frame, Alternative Allocation

df_opt_caschool_input_il

Test Dataset California Test Score Data: IL Frame, Generated Effect Each Additional Allocation

Support Files

Support functions and sample files that generate allocation space parameters from estimation space

ffy_opt_dtgch_cbem4()

Generates A_i and alpha_i for linear and log linear problems Cebu 4 Groups

ffy_opt_ghthm_dk()

ghthm = graph theme, support theme files