This repository contains Julia code for the simulation and empirical sections of my paper, forthcoming at Management Science. The latest working paper version is available here on ArXiv.
The replication requires a working Julia installation as well as the following packages:
dependencies = ["Revise", "BayesianOptimization", "GaussianProcesses", "StatsBase",
"Random", "Distributions", "Optim", "Plots", "Statistics", "CategoricalArrays",
"DataFrames", "GLM", "CSV", "Statistics"]
Pkg.add(dependencies)
All plots and the logs used to construct tables can be generated by running:
julia generate_all.jl
The replication procedure is described in detail as follows.
-
The analytical calculations in Table 1 are checked numerically using the file
cutoff_figure.jl
- The function
Example1()
does a numerical check on the analytical calculations in Table 1 for the Stackelberg-optimal, cutoff rules, and optimal rule. - The function
Example2()
does the same for Table 2. - The function
dro_bs_example()
checks the calculations for the max-min biased sampling rule for Table 1.
- The function
-
Figure 1 is generated using the function
createCutoffFigure()
from the filecutoff_figure.jl
-
The three plots making up Figure 2 are generated using the function
generateCouponPlots()
from the filecontinuous_model.jl
-
The statistics for Table 3 and Table 4 are computed using the function
bootstrap_ses()
from the filesemi_synthetic.jl
-
Figure 3 is generated using the function call
regret_simulation(PrefTypes)
from the fileregret.jl