This Julia package replicates the results presented in Section 6.4 and produces simulations for a wider range of parameter values not presented in the paper.
Paper: https://doi.org/10.1287/mnsc.2021.4085
- Julia 1.5 - 1.6.5 (in 1.7 and later, the rng changed, hence using more recent Julia versions will not precisely reproduce the results)
- Packages specified in "Project.toml"
- Extract files from this package into a folder (e.g. via
git clone https://github.com/rgreminger/SearchDiscoveryReplication.jl
) - In Julia, navigate to the folder (
cd("path/to/folder")
) - Activate environment by running
using Pkg; Pkg.activate(".")
- Install packages by running
Pkg.instantiate()
replicate_main.jl
: Produces results in Section 6.4 (results are saved in /gen)replicate_other_specs.jl
: Produces results for other parameter values (note that this can take some time)replicate_test_estim.jl
: Checks whether models recover parameters when data is generated from selfsrc/replication.jl
: Contains functions specific for replication
Documentation for the functions is provided through docstrings, which in Julia can be accessed through ?function
(e.g. ?runSimulations
).
The following document provides the additional derivations underlying two functions in src/reservation_values.jl: notes_reservation_values.pdf
(Github unfortunately does not render LaTex equations...)
Several core functions can use multi-threading for considerable performance improvements. To use this, start Julia with multiple threads enabled (see Julia Docs).