https://doi.org/10.5281/zenodo.17853927
0_run.do
clear
timer clear 1
timer on 1
set varabbrev off
// Install necessary packages
net install rscript, from("https://raw.githubusercontent.com/reifjulian/rscript/master") replace
ssc install estout, replace
ssc install reghdfe, replace
ssc install ftools, replace
ssc install binscatter, replace
// Produce Figure 1 using R
// If Stata is not able to call on R, run the file "Figure 1/figure1.R"
// by using R/RStudio.
cd "Figure 1"
rscript using figure1.R
cd ..
// Produce Figure 2 using R
// If Stata is not able to call on R, run the file "Figure 2/figure2.R"
// by using R/RStudio.
cd "Figure 2"
rscript using figure2.R
cd ..
// BUILD SHALE WELL DATASET
// Save to folder Temp
// Load and initialise well data
do Scripts/1_welldata.do
// Add macrodata and prices
do Scripts/2_macrodata.do
// Run data preparation script
do Scripts/3_dataprep.do
// Save shale well dataset to disk
save Temp/main_processed.dta, replace
clear
// BUILD CONVENTIONAL WELL DATASET
// Save to folder Temp
do Scripts/1c_welldata.do
// Add macrodata and prices
do Scripts/2c_macrodata.do
// Run data preparation script
do Scripts/3c_dataprep.do
// Save conventional dataset to disk
save Temp/c_main_processed.dta, replace
clear
// REPLICATE SHALE WELL RESULTS
use Temp/main_processed.dta
do Scripts/4_replication.do
clear
// REPLICATE CONVENTIONAL WELL RESULTS
use Temp/c_main_processed.dta
do Scripts/4c_replication.do
timer off 1
timer list 1
di "Done! ----"
di "Now compile the TeX-file named Output.tex."
di "The resulting file Output.pdf will contain all figures and tables."