Replication in R

R code that regenerates the numbers this paper reports, starting from the dataset published on this site. It reproduces 75 of 88. The 13 it does not produce are listed below.

Run it

Rscript run.R

run.R is the whole package. Save it and run it: it reads the dataset from this site if the CSV is not sitting beside it, and loads the shared conventions file the same way, so it works on its own in an empty directory. It needs R with fixest, and depending on the paper lme4, metafor, plm, BMS or LowRankQP. It writes results.json, one value per number, each named for where it appears in the paper.

How it compares with Stata

Most of these papers were estimated in Stata, and the two programs differ in places that change printed digits. Those conventions are stated once, in stata_compat.R, and shared by every replication on this site: ivreg2's large-sample variance, SSC winsor's order statistics, xtreg's treatment of singleton groups, and the restricted-ML default of xtmixed, which is not the default of the mixed command that replaced it.

Numbers this code does not produce

cellpaperthis code
HL_stockpartic_10pp_effect_ols0.24not computed
HL_assetholders_core_ols0.21not computed
HL_assetholders_all_ols0.35not computed
HL_econsig_max_stockpartic_ols0.931not computed
HL_econsig_sd_stockpartic_ols0.141not computed
HL_econsig_max_gdppc_ols0.683not computed
HL_econsig_sd_gdppc_ols0.088not computed
HL_econsig_max_eascredit_ols-0.119not computed
HL_econsig_sd_eascredit_ols-0.02not computed
HL_econsig_max_realrate_ols-0.265not computed
HL_econsig_sd_realrate_ols-0.019not computed
HL_econsig_max_ruleoflaw_ols-0.087not computed
HL_econsig_sd_ruleoflaw_ols-0.012not computed

This number is not produced here. The paper's figure is a Bayesian model averaging posterior mean, and no wrapper in stata_compat.R fits BMA, so it is quoted rather than computed. The number shown beside it is the OLS/frequentist-check coefficient on the same variable in the same table, a different estimator, reported for orientation only. Scoring it against the BMA figure would record a failure of the code where the truth is that the quantity was never computed. paper value is a BMA posterior mean (2.4) x 0.10; produced value is the OLS/frequentist-check counterpart (Table 2 marketpartic coef x 0.10), not the same estimator, see REPLICATION_STATUS.md

This number is not produced here. The paper's figure is a Bayesian model averaging posterior mean, and no wrapper in stata_compat.R fits BMA, so it is quoted rather than computed. The number shown beside it is the OLS/frequentist-check coefficient on the same variable in the same table, a different estimator, reported for orientation only. Scoring it against the BMA figure would record a failure of the code where the truth is that the quantity was never computed. paper value is the BMA posterior mean for Asset holders, core-countries specification (Table 2); produced value is the OLS/frequentist-check coefficient on the same variable in the same table

This number is not produced here. The paper's figure is a Bayesian model averaging posterior mean, and no wrapper in stata_compat.R fits BMA, so it is quoted rather than computed. The number shown beside it is the OLS/frequentist-check coefficient on the same variable in the same table, a different estimator, reported for orientation only. Scoring it against the BMA figure would record a failure of the code where the truth is that the quantity was never computed. paper value is the BMA posterior mean for Asset holders, all-countries specification (Table 1); produced value is the OLS/frequentist-check coefficient on the same variable in the same table

This number is not produced here. The paper's figure is a Bayesian model averaging posterior mean, and no wrapper in stata_compat.R fits BMA, so it is quoted rather than computed. The number shown beside it is the OLS/frequentist-check coefficient on the same variable in the same table, a different estimator, reported for orientation only. Scoring it against the BMA figure would record a failure of the code where the truth is that the quantity was never computed. Table 3 economic-significance figure, BMA-based; produced value uses the OLS coefficient in place of the BMA posterior mean, same sample

This number is not produced here. The paper's figure is a Bayesian model averaging posterior mean, and no wrapper in stata_compat.R fits BMA, so it is quoted rather than computed. The number shown beside it is the OLS/frequentist-check coefficient on the same variable in the same table, a different estimator, reported for orientation only. Scoring it against the BMA figure would record a failure of the code where the truth is that the quantity was never computed.

Files