Replication in R
R code that regenerates the numbers this paper reports, starting from the dataset published on this site. It reproduces 208 of 218. 2 do not match the printed paper and 8 are not produced at all; both 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 that do not match the printed paper
Cells are named as they are in results.json. The reason for each difference follows the table.
| cell | paper | this code |
|---|---|---|
| Table 2 [Estimates from all Impulse Responses]: Mean | 33.5 | 33.449495 |
| Table 2 [Hump-Shaped Impulse Responses]: Std. Dev. | 14.1 | 14.035579 |
The sample mean of the transmission lag on the cleaned sample is 33.449495 months, which is 33.4 at one decimal, not the 33.5 the paper prints here and repeats twice in the text. Every other cell of this row -- 198 observations, median 37, standard deviation 19.4, minimum 1, maximum 60 -- reproduces exactly, as do both other rows' means, so the sample is the intended one. The gap is 0.05 months.
The standard deviation of the transmission lag over the 100 hump-shaped impulse responses is 14.035579, i.e. 14.0 at one decimal, against a printed 14.1. The other five cells of this row reproduce exactly, including the count of 100 and the maximum of 57, and censoring at sixty months does not touch this subsample, so the same 100 values give both the reproduced and the unreproduced cells.
Numbers this code does not produce
| cell | paper | this code |
|---|---|---|
| Table 5 [Financial Dev.]: Posterior Mean | 12.492 | not computed |
| Table 5 [Monthly]: Posterior Mean | -4.175 | not computed |
| Table 5 [Strictly Decreasing]: Posterior Mean | 26.122 | not computed |
| Abstract: average transmission lag (months) | 29 | not computed |
| Section 3: implied lag for the ideal study (months) | 29.2 | not computed |
| Section 3: implied lag preferring hump-shaped responses (months) | 16.3 | not computed |
| Abstract: maximum decrease in prices (percent) | 0.9 | not computed |
| Section 4: impulse responses reaching a -0.1 percent decrease (of 198) | 173 | not computed |
Bayesian model averaging over the thirty-three candidate regressors, run as an MCMC birth-death sampler with 100 million burn-in and 200 million recorded draws under a uniform model prior and the unit information prior. The model space has 2^33 members, so it cannot be enumerated and the posterior means are the output of one stochastic chain rather than a closed-form quantity. A fresh chain would return its own numbers, which are not the paper's.
Bayesian model averaging over the thirty-three candidate regressors, run as an MCMC birth-death sampler with 100 million burn-in and 200 million recorded draws under a uniform model prior and the unit information prior. The model space has 2^33 members, so it cannot be enumerated and the posterior means are the output of one stochastic chain rather than a closed-form quantity. A fresh chain would return its own numbers, which are not the paper's. This figure is a linear combination of those posterior means evaluated at the paper's best-practice values, so it inherits the chain.
Bayesian model averaging over the thirty-three candidate regressors, run as an MCMC birth-death sampler with 100 million burn-in and 200 million recorded draws under a uniform model prior and the unit information prior. The model space has 2^33 members, so it cannot be enumerated and the posterior means are the output of one stochastic chain rather than a closed-form quantity. A fresh chain would return its own numbers, which are not the paper's. The same best-practice combination, printed to one decimal. Evaluating it from Table 5's own printed posterior means and this sample's means and maxima gives 29.184, which is the printed 29.2; that is arithmetic on the paper's published output, not a reproduction of the estimation behind it.
Bayesian model averaging over the thirty-three candidate regressors, run as an MCMC birth-death sampler with 100 million burn-in and 200 million recorded draws under a uniform model prior and the unit information prior. The model space has 2^33 members, so it cannot be enumerated and the posterior means are the output of one stochastic chain rather than a closed-form quantity. A fresh chain would return its own numbers, which are not the paper's. Same combination with Strictly Decreasing set to zero. Evaluated from Table 5's printed posterior means it gives 16.255, i.e. the printed 16.3, which also settles which BMA the sentence refers to: the baseline one of Table 5 with the shape dummy switched off, not the separate hump-shaped-subsample estimation of figure 4.
The response column the authors summarise here is the normalised maximum decrease in prices, carried in the published file as MBR. Its mean over the 198 estimates is -0.011993, i.e. 1.20 percent in the percentage-point units the companion paper's script uses (res = 100*res), against the 0.9 percent printed. No scaling of that column reconciles both this figure and the count of 173 below, so the published columns do not carry the series behind the sentence.
The response variable behind this count -- the number of months to a -0.1 percent decrease in prices, used for figure 5 and table 11 -- is not among the published columns. The closest available construction, counting the estimates whose normalised maximum decrease reaches 0.1 percent, gives 171.
Files
- run.R, the replication
- stata_compat.R, the Stata conventions
- targets.json, the numbers as printed in the paper, taken from the paper rather than from the code
- results.json, the numbers this code produced
- REPLICATION_STATUS.md, the full comparison, generated from this package's own output