Replication Files

Chapter-by-chapter code and results for Parts III and IV of Electoral System Incentives for Interparty and Intraparty Politics

Each chapter of Parts III and IV — chapters 5 through 14 — has a page of its own. A chapter page reproduces every table and figure in that chapter, shows the code that produced it, and explains what the code is doing. The explanations assume no prior knowledge of R: they are written for readers who want to follow the reasoning, not only inspect the output.

Code is hidden or shown with the Code button at the top right of each page, so a chapter can be read either as an account of the analysis or as a working script.

Two corrections to the published book

In preparing these materials we re-examined the code behind every table and figure, and found two mistakes that survived into print. Both are described here and again on the chapter pages themselves. In each case the published result is reproduced as published, with the correction presented alongside it rather than quietly in its place, so readers can see exactly what changed.

Chapter 7 · The Size of the Party System

When simulating expected values, five model runs should each have used an imposed value of the Total Duvergerian Effect. Because a set of columns was selected by position rather than by name, one of the five runs used the observed values instead.

Consequence. Figures 7.2 to 7.4 as printed show flatter relationships and considerably wider confidence intervals than the corrected code produces. The correction strengthens the chapter's findings: the relationships are sharper, and estimated far more precisely, than the book reports. The corrected figures are the ones shown here.

Chapter 12 · Committee Systems and Assignments

In Model 3 of Table 12.1, a term intended to express committees per legislator was placed outside the model formula. In that position R read it not as an offset but as a set of observation weights, so the published model weights each legislature by the size of its chamber instead of modelling a rate.

Consequence. Under the corrected specification the coefficients on Average Personalism and the Total Duvergerian Effect in that column are no longer statistically significant. Models 1 and 2 are unaffected. Table 12.1 appears here as published, followed by a section giving both the corrected specification and one with no offset at all.

Other things worth knowing

Two versions of the electoral system scores

The predicted scores for the Total Duvergerian Effect and Average Personalism were revised during the project, and the later version covers slightly more elections. Chapters 6 through 11 use the later scores. Chapter 12 uses the earlier ones, because that is what the published Table 12.1 was computed from, and because that chapter uses the scores directly as explanatory variables. Chapter 12 also re-runs its first half on the later scores, so readers can see that its conclusions do not depend on the choice.

A few figures will not reproduce exactly

Some steps of the analysis draw random numbers without fixing a starting point, so they give slightly different results each time they run. This affects the appearance of three figures in chapter 6, where overlapping points are nudged apart to keep them visible, and the confidence bands of Figure 9.5. Everything else reproduces exactly, and no substantive quantity is affected.

How these pages were prepared

The analysis, the outline and a large part of the commentary are the authors' own. After the book was in print we also used Anthropic's Claude (model Opus 5) to check the integrity of the code, to annotate it so that readers can follow the reasoning, and to help prepare these pages. The two corrections described above came out of that review.

The chapters

The code

The R Markdown source behind these pages, together with the datasets needed to run it, is available at github.com/i3dataset/i3-replication. Each chapter page here corresponds to one file in that repository.

Every chapter page ends with a record of the software used to produce it — the version of R and of each package — so that a reader who obtains a different result can tell that apart from using different software.