Carbon Tax & CO2 — Synthetic Control Lab

A pedagogical companion to Carbon Taxes and CO2 Emissions: A Synthetic-Control Analysis in Python ↗ Back to the post

Did Sweden's 1991 carbon tax cut transport CO2?

In 1991, Sweden became one of the first countries to put a price on carbon dioxide. Three decades later, two questions matter for policy: (1) did the carbon tax actually reduce CO2 emissions from transport, and (2) did it cost Sweden any economic growth? The post answers both using synthetic control. This app lets you walk through the evidence yourself.

In four tabs you will: see Sweden plateau while its counterfactual keeps climbing; inspect the six donor countries the optimiser picks; play with a placebo distribution to feel where the permutation p-value of 0.067 comes from; and compare the naive pre/post, DiD, synthetic-control, OLS, and IV estimates on a single forest plot.

The central picture: actual vs synthetic Sweden

The animation below sketches the post's headline visual. Before 1990 the two curves overlap — the synthetic version of Sweden matches the real one tightly. After 1990 they peel apart. Sweden plateaus; Synthetic Sweden keeps climbing. The shaded wedge is the treatment effect that the analysis below estimates at roughly −11.3% per year.

Stylised illustration of the central SCM idea. The actual numbers from the post — the 6-donor weights, the 46-year path, the placebo distribution — appear in tabs 2 and 3.

Tab 2

Synthetic Sweden

The 46-year path plot and the six donor weights. Toggle the gap subplot to see the −11.3% headline number form across 1990–2005.

Tab 3

Placebo Distribution

The post/pre MSPE ratios for all 15 countries and the in-space placebo gap "spaghetti" plot. Where does p = 0.067 come from?

Tab 4

Method Comparison

Five estimators on one chart: naive pre/post, DiD vs Denmark, DiD vs OECD pool, Synthetic Sweden, plus OLS and IV elasticities. Plus the carbon-tax-vs-VAT decomposition.

Headline numbers from the post

Synthetic Sweden — avg gap
−11.3%
per year, 1990–2005
Permutation p-value
0.067
1 in 15 placebos as extreme as Sweden
Leave-one-out range
8.8 to 13%
drop any high-weight donor
Tax vs price asymmetry
consumers respond 3× harder to taxes

Glossary (open a card if a term is unfamiliar)

Counterfactual
What would have happened without the policy. Never observed; always estimated.
Donor pool
The set of untreated countries used to build the counterfactual. Sweden's pool: 14 OECD economies.
Synthetic control
A weighted blend of donor countries chosen to mimic the treated unit before treatment. Weights are non-negative and sum to one.
Parallel trends (DiD)
The DiD assumption that treated and control units would have moved in step without treatment. SCM relaxes this by data-driven weighting.
Pre-treatment MSPE
Mean squared prediction error of the outcome before the policy. Small values mean the synthetic fits Sweden tightly.
Post/Pre MSPE ratio
The placebo-test statistic. Numerator: how big is the post-period gap. Denominator: how badly did the SCM fit the pre-period. Sweden's ratio is the highest of all 15 countries.
Permutation p-value
Fraction of placebo units (treating each donor as if it were treated) with a ratio at least as large as Sweden's. Here: 1 / 15 = 0.067.
Leave-one-out
Re-fit Synthetic Sweden after dropping one high-weight donor at a time. If the gap survives all drops, it is not driven by any single donor.
Semi-elasticity
In a log-level model, the percent change in y when x rises by one unit. The OLS/IV section reports semi-elasticities to tax and price.
Instrumental variable (IV)
A variable that shifts the endogenous regressor (here, price) but does not affect the outcome directly. Andersson uses crude-oil price and energy tax.

Synthetic Sweden — the path and the gap

Synthetic Sweden is a weighted blend of donor countries chosen so the blend matches Sweden as closely as possible before the carbon tax. pysyncon picks Denmark (29%), Belgium (27%), New Zealand (15%), Greece (11%), the United States (10%), and Switzerland (8%). These six donors carry 100% of the weight; the other eight donors are essentially zero. The chart below plots Sweden against this synthetic counterfactual across all 46 years of the panel.

Path plot: Sweden vs Synthetic Sweden (1960–2005)

What to look for: the two curves overlap almost perfectly from 1960 to 1989 (good pre-treatment fit), then diverge after 1990. Sweden plateaus around 2.3 t/capita; Synthetic Sweden keeps climbing toward 2.85. Hover any orange point to see the year-by-year gap.

Gap plot: Sweden − Synthetic Sweden

Same numbers, different axis. The gap hovers near zero before 1990 (the counterfactual fits) and widens to roughly −0.36 t/capita by 2005. The shaded post-treatment region is the SCM estimate of the treatment effect — about −11.3% per year, sustained for 16 years.

Donor weights: which countries make up Synthetic Sweden?

The optimiser chose six donors to sum to 100% of the weight. Denmark and Belgium dominate (about 56% of the weight together) — both are small, advanced European economies with similar income and energy mix. The remaining four (New Zealand, Greece, US, Switzerland) fill in the rest. The nine donors not shown received weight < 0.5%.

What to look for

  • Pre-treatment fit is excellent. A tight pre-period fit is the price of admission for SCM. If the synthetic and the actual already diverged before 1990, the post-1990 gap would not be credible.
  • The post-1990 gap grows monotonically. It is −0.10 in 1990, −0.16 in 1991, and −0.36 by 2005. A growing gap is consistent with a real, persistent policy effect.
  • Concentrated weights are reassuring. If the optimiser had spread weight across 14 donors equally, it would be a sign that no good counterfactual exists in the pool. Six dominant donors means we have a strong match.

Placebo Distribution — where does p = 0.067 come from?

Sweden's gap looks dramatic on the path plot. But the synthetic-control optimiser is designed to make Sweden look unique in the post-period. To test whether the gap is just noise, we re-run the SCM 15 times — once for each country, pretending it was treated in 1990. If Sweden's gap is unusual compared to these placebos, the effect is unlikely to be an artefact of the method.

Drag left to exclude placebos with bad pre-treatment fit (large pre-MSPE). Andersson recommends keeping only countries whose synthetic version fits well in the pre-period.

Gap "spaghetti" plot: Sweden vs 14 placebo donors

Each grey line is the gap series for one placebo country (where that country is pretended to be treated in 1990). Sweden's gap (orange) sits clearly outside the cloud after 1990. That is the visual basis for the permutation p-value.

Post/Pre MSPE ratios across all 15 countries

To compare gaps fairly, each country's post-treatment MSPE is divided by its pre-treatment MSPE. A high ratio means "the post-period gap is big relative to how well the SCM fits the pre-period". Sweden has the highest ratio of all 15 countries.

Sweden's MSPE ratio
25.41
highest of any unit
Next-highest (Spain)
15.70
about 62% of Sweden's
Permutation p-value
0.067
= 1 / 15 (Sweden ranks first)
Donor-pool floor
1 / 15
smallest possible permutation p with this pool size

What to look for

  • Sweden's gap escapes the placebo cloud after 1990. In the years before treatment, Sweden's gap (orange) sits inside the grey envelope. After 1990 it visibly leaves the bundle — that is the visual signal underneath the formal p-value.
  • The post/pre ratio penalises bad pre-fit. Spain's raw post-period gap is huge, but its pre-period fit was so poor that the ratio is still below Sweden's. The metric correctly rewards units the SCM could match in the pre-period.
  • Slide the pre-fit threshold left. Removing placebos with poor pre-fit (large pre-MSPE) thins the grey cloud and makes Sweden's gap stand out even more clearly. The p-value would not change here (Sweden is still rank 1), but the visual evidence sharpens.
  • 1 / 15 = 0.067 is the floor. With only 15 countries, the smallest non-trivial permutation p-value is 1/15. Andersson notes this explicitly: the donor pool size caps statistical power, not the magnitude of the effect.

Method Comparison — six estimators on the same data

The post estimates the carbon tax effect six different ways. Three target the aggregate emissions effect (naive, DiD, synthetic control). Three target the consumer-demand semi-elasticities (OLS4, IV with oil price, IV with energy tax). The forest plot below lays them out side by side so the ranking, sign, and uncertainty are visible at a glance.

Forest plot of all estimates

Each row is a method; each panel is an outcome. Bars are 95% confidence intervals; dots are point estimates. Hover any point to see the standard error and the number of donors / controls used.

Toggle outcomes and methods below to compare subsets. The Transport CO2 (t/cap) column compares the aggregate methods — naive (+0.55, confounded) flips sign through DiD (−0.14 to −0.21) to Synthetic Sweden (−0.27 to −0.36).

Outcomes

Methods

Why the naive estimate flips sign

The single-country pre/post comparison reports +0.55 t/capita — it claims Sweden emitted more after 1990, not less. This is correct as arithmetic but useless as causal evidence. It treats every other thing that changed in Sweden (population growth, EU integration, vehicle stock) as if it were part of the carbon tax's effect.

Once we introduce a control, the sign flips. DiD vs Denmark gives −0.14 (the right sign, but underpowered with one donor). DiD vs the 14-country OECD pool tightens to −0.21 (p = 0.02). Synthetic Sweden's 2005 estimate is −0.36 — the largest signed estimate because it weights the most-similar donors rather than averaging everyone.

Disentangling the bundle: carbon tax vs VAT

The 1990/91 reform was a bundle — a new carbon tax, a new VAT on transport fuel, and a small reduction in the pre-existing energy tax. The synthetic-control number above measures the total effect. The chart below uses Andersson's tax-incidence model to switch the carbon tax and VAT on and off separately. The orange wedge is the carbon-tax-only contribution.

Average post-1990 carbon-tax-only contribution: −9.5% of the no-carbon-tax-with-VAT baseline. By 2005 the wedge widens to −0.57 t/capita — about 75% of the total reform effect that year.

What to look for

  • The naive estimate is the outlier. It points the wrong way (positive). Every estimator with a control unit (DiD, SCM) points negative. The lesson: a counterfactual matters more than the choice between DiD and SCM.
  • OLS4 and the three IVs agree on the tax coefficient. β2 = −0.186 in all four (to four decimal places). When OLS and IV agree, the price regressor was likely exogenous all along.
  • Tax response ≈ 3× price response. β2 = −0.186 vs β1 = −0.060. Same SEK/litre, three times the behavioural impact. Salience and permanence are the leading explanations.
  • The carbon tax does most of the work after 2000. The orange wedge widens sharply when the carbon tax rate is ratcheted up in the 2000s — consistent with Sweden's actual policy timetable.

Connecting back to the post

Five claims emerge from the analysis, each built on a different piece of evidence in this app:

  • The carbon tax cut Swedish transport CO2. The synthetic-control point estimate is an 11.3% average annual reduction over 1990–2005 (Tab 2).
  • The result is robust. Three independent placebo tests support it (Tab 3).
  • No growth penalty. A separately built Synthetic-Sweden(GDP) tracks Sweden's actual GDP within $233 per capita by 2005.
  • Pass-through was complete. The retail price absorbed the entire tax change (β ≈ 1.15).
  • Consumers responded ~3× more strongly to taxes than to prices of the same magnitude (Tab 4).