Stata Programs for Monte Carlo and Meta-analysis

Important note: those programmes are provided "as is". They were designed in particular to

accomplish certain goals for the handbook chapter, and to work using a folder structure, not

to be general purpose Stata commands. We will answer queries, but users are expected to

be able to alter the code to meet their own objectives (to change paths...).

Warning: when Google ported our site from "classic" Google sites, they appear to have deleted all the links where you see "here" below. Unfortunately, we did not yet fix all these links (main ones should work now)

There is an archived version of the old page with all working links here

  • Monte Carlo 1: Fixed effects

  • Here is the master do file for this Monte Carlo.

  • Data needed is here.

  • Here is the program for SILS (structurally iterated least squares) developed to resemble the method of Anderson and van Wincoop (2003).

  • To run it you will need to have the contraction mapping ado file in the same folder.

  • Other estimation programs:

    • BVU (Bonus Vetus OLS, simple averages), refer to Baier and Bergstrand (2010)

    • BVW (Bonus Vetus OLS, GDP-weighted), refer to Baier and Bergstrand (2009)

    • LSDV (Least squares with country dummies), refer to Harrigan (1996)

    • OLS (Linear-in-logs with GDPs), refer to Tinbergen (1962)

    • Tetrads (Ratios of reference exporter & importer), refer to Head et al. (2010)

    • DDM (Double-Demeaning of LHS & RHS)

    • ddmean (program used by DDM)

  • Monte Carlo 2: Gravity's Errors

    • The four files listed below, pml_a, pml_b, pml_c, and pml_d run the monte carlos for the four panels of Figure 3 which compare performance of OLS with Poisson and Gamma PML under 4 DGPs. The makes the figures.

  • Meta-analysis

    • Here is the master do file for this Meta-analysis.

    • Data needed for coefficients and price.

    • List containing author, journal and year is here.


  • Monte Carlo 3: Structural Zeros

    • Here is the master do file for the Monte Carlo. You will also need the contraction mapping.

    • This Monte Carlo do file includes the MaMu test (Manning and Mullahy, 2001).

    • Here is the do file for different zero shares.

    • Do file comparing MaMu and different DGP (Figure 4).

    • Data is here:

    • Estimation programs:

      • OLS used for LSDV

      • ET Tobit, refer to Eaton and Tamura (1994)

      • EK Tobit, refer to Eaton and Kortum (2001)

      • Poisson PML

      • Gamma PML

      • Negative Binomial