Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

https://doi.org/10.5281/zenodo.17853927
08 December 2025, 22:44:26 UTC
  • Code
  • Branches (0)
  • Releases (1)
  • Visits
    • Branches
    • Releases
      • 1
      • 1
    • 2a59acd
    • /
    • Replication
    • /
    • 0_run.do
    Raw File Download

    To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
    Select below a type of object currently browsed in order to display its associated SWHID and permalink.

    • content
    • directory
    • snapshot
    • release
    origin badgecontent badge
    swh:1:cnt:4383126d15369036cf93f37a9f96b91f75f2d1fb
    origin badgedirectory badge
    swh:1:dir:5de8a35b966454a9cd37473dad0042504c34a69a
    origin badgesnapshot badge
    swh:1:snp:e74a8dad5aa507fe65addfcc2a4933cd2cf67d85
    origin badgerelease badge
    swh:1:rel:8c8c1f9142ec59519c531ba72737d844f5c6a3e3

    This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
    Select below a type of object currently browsed in order to generate citations for them.

    • content
    • directory
    • snapshot
    • release
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    (requires biblatex-software package)
    Generating citation ...
    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."

    back to top

    Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
    The source code of Software Heritage itself is available on our development forge.
    The source code files archived by Software Heritage are available under their own copyright and licenses.
    Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API