Case Study 24 · Live, 30 November 2026

Crop Insurance Subsidies in Brazil: Farms, Drought and What the Estimators Say

Impact evaluation · Staggered difference in differences · Callaway-Sant’Anna · Sun-Abraham · Goodman-Bacon · HonestDiD · Drought index (SPI) · Power calculation · DuckDB SQL · R · Python · JavaScript · 41 tests

The business question

Since 2006 the federal government pays part of the premium of crop insurance bought by Brazilian farmers (Programa de Subvenção ao Prêmio do Seguro Rural, PSR). Insurance can make farmers plant more and invest, because a bad year no longer ruins them (Karlan et al., 2014; Cai, 2016; Mobarak and Rosenzweig, 2013), or make them take less care of a crop that is covered (Smith and Goodwin, 1996). Which one happened in Brazil? Did grain area, output and yields change where the subsidised insurance arrived? And when a drought hits, do municipalities with more insurance cut their planting less the next season?

These are the questions a ministry, a development bank or an international agency asks of any programme, and they are answered here the way an evaluation should be done today. The insurance reached municipalities in different years, which is what makes an evaluation possible, and also what makes the textbook regression misleading. The case shows the method on public data; it is not an official evaluation of the programme and makes no policy recommendation. The sibling case on grain prices and basis covers the same markets from the selling side.

The data

All public, downloaded by a script with no account:

  • The insurance: every subsidised policy from 2006 to 2025, from the MAPA open data (SISSER, CC BY): 1,710,869 policies with municipality, crop, area, insured value, premium, subsidy and the indemnity paid with its main cause (drought, hail, frost, excess rain). The files carry the name and a masked document of each farmer; the reader adds the policies up by municipality, year and crop while downloading, and never writes a line with a person on disk.
  • The farms: IBGE’s Produção Agrícola Municipal (SIDRA table 1612): area planted and harvested, output, yield and value of soybeans, corn and wheat in every municipality, 2000-2024.
  • The rain: CRU TS 4.09 monthly precipitation on a half-degree grid, 1901-2024 (University of East Anglia, Open Government Licence; Harris et al., 2020), turned into a six-month Standardised Precipitation Index (Guttman, 1999) at each municipality’s centroid, from IBGE’s municipal mesh.

The sample is the 2,754 municipalities that planted at least 1,000 hectares of grains on average in 2000-2005, before the programme. A municipality adopts the insurance in the first year in which subsidised policies cover 5% or more of its grain area (1% and 10% are shown as alternatives). Coverage went up and down with the programme’s budget (4% of grain area in 2006, 20% in 2020 and 2021, 9% in 2024), so the effect measured is that of first entering the programme, not of a constant level of coverage.

Try it

See where and when the insurance arrived; pick an outcome and an estimator and read the event study; see which comparisons the naive estimate is made of and how far parallel trends could fail before the effect disappears; read how drought and coverage interact; and size your own evaluation with the power calculator.

Method, and why this one

A panel in SQL. DuckDB joins the insurance totals, the crop statistics and the drought index into a municipality-by-year panel, 2000-2024: grain area, output, value, soybean and corn yields, area under subsidised policies and its share of the area planted, indemnities by cause, and the February SPI-6, which covers the summer crop season from September.

Why not the usual regression. With adoption in different years, a regression with municipality and year fixed effects (TWFE) averages every two-by-two comparison in the data, including those that use municipalities already insured as controls for later ones. When effects grow with time, those “forbidden” comparisons pull the estimate down and can even flip its sign (Goodman-Bacon, 2021; de Chaisemartin and D’Haultfœuille, 2020). The case runs it anyway, and its Goodman-Bacon decomposition shows the weight of each kind of comparison.

Estimators built for staggered adoption. Callaway and Sant’Anna (2021) estimate an effect for each adoption cohort and year against municipalities never treated, or not yet treated, doubly robust with the pre-programme area and soybean share as covariates (Sant’Anna and Zhao, 2020), with bootstrap errors clustered by municipality; the cohort effects are averaged by years since adoption. Sun and Abraham (2021) give the same event study by regression. The estimator is also written in Python, and a test checks that it gives the same group-time effects as the R package.

Parallel trends, tested and stressed. The years before adoption show whether insured and control municipalities were already drifting apart; a pre-test can miss violations (Roth, 2022), so the Rambachan and Roth (2023) bounds show how large a violation after adoption, as a multiple of the largest one before, the effect survives; their smoothness version lets the pre-adoption trend carry on in a straight line. As a second check, the estimators are also run on each outcome net of the municipality’s own linear trend in 2000-2005.

Drought and resilience. A drought year is one with February SPI-6 below -1, in the South, Southeast and Centre-West, where that window is the summer crop season (in the North and Northeast it would measure the dry season). The change in grain area the next season is regressed on drought, coverage the year before and their product, with municipality and state-by-year fixed effects, errors clustered by municipality; a version by coverage band shows the shape. Indemnities per hectare in drought years show how much of the loss the insurance paid.

Designing the next evaluation. The power calculator gives the minimum detectable effect of a difference in differences with m periods before and r after and serial correlation (McKenzie, 2012), the first question when a programme is about to be evaluated.

Result

The naive estimate says the insurance added half again to grain area. It did not. A regression with municipality and year fixed effects finds that adopting the insurance raised grain area by 53%. The Goodman-Bacon decomposition shows what it averages: 55% of the weight on insured against never-insured municipalities (an estimate of +97%), 23% on earlier against later adopters, and 22% on “forbidden” comparisons that use municipalities already insured as controls (-11%). The estimators built for staggered adoption give smaller numbers: +22% with Callaway and Sant’Anna against not-yet-treated municipalities, going from -3% in the year of adoption to +34% ten years later.

But the adopters were already growing faster. In the six years before adoption, insured municipalities grew a little faster than their controls in five of them (up to 3.5% in one year, about 6% in all), and the joint test of no pre-trend is rejected (p < 0.001). The insurance arrived first where soybeans were advancing. Net of each municipality’s own 2000-2005 trend, the effect on grain area is zero (-0.4%, standard error 8.8%), and so is the effect on the value of output (-10%, standard error 14%). The Rambachan and Roth bounds for the average of the first three years after adoption include zero even if parallel trends hold exactly (from -18% to +29%). The answer also depends on how adoption is defined: net of the trend, the effect on area is +7.7% (standard error 6.9%) when adoption needs 10% of the area insured, but +25% (standard error 8.8%) when 1% is enough, and the value of output moves the same way. There is no robust evidence that the subsidy added grain area beyond an expansion already under way.

Soybean yields fell where insurance arrived, and that survives the checks. Against not-yet-treated municipalities, soybean yield is 191 kg per hectare lower after adoption (standard error 52), about 7% of the average 2,770 kg. The drop survives letting the pre-adoption trend carry on in a straight line (smoothness bounds from -491 to -72 kg for the first three years), though not violations half as large as the largest seen before adoption, and against never-treated municipalities alone it is smaller and not significant (-71 kg, standard error 62). It holds at the other adoption thresholds: -132 kg (standard error 36) at 1% and -156 kg (standard error 24) at 10%. Lower yields fit both stories the literature tells: insured farmers planting riskier land, and taking less care of a covered crop (Smith and Goodwin, 1996). Municipal data cannot tell them apart.

Insurance cushions the year after a drought. In the South, Southeast and Centre-West (1,900 municipalities, 2007-2023), a drought cuts the next season’s grain area by 3.7% where coverage the year before was under 5%. The cut shrinks as coverage rises (by 2.0, 3.6 and 5.7 points in the 5-20%, 20-40% and 40%-or-more bands) and disappears where 40% or more was insured. In a drought year the indemnity paid was R$ 202 per hectare planted in the most insured municipalities, against R$ 2.70 in the least. A drought also lowers the value of output in the year by 4.3%, with no difference by coverage: insurance does not save the harvest, it replaces the income and keeps the farm planting. A linear interaction of drought and coverage gives the opposite sign (p = 0.047), driven by municipalities where insured area exceeds the area planted, a mismatch between policy year and crop year; the bands are the result to read.

What an evaluator would say. The programme’s visible effect is on risk, not on how much is planted: it keeps planting going after a drought, while the apparent expansion is the frontier that was already moving, and yields fell somewhat where coverage arrived. A credible answer on output would need farm-level data or a rule that assigned the subsidy, which the open data do not have; the power calculator shows what such a study would need.

Limits

Adoption was not random: the insurance reached first the municipalities with more grain, credit and insurers. The doubly robust estimates, the not-yet-treated controls, the pre-adoption years and the sensitivity bounds are there for that, and the page reports what survives them, not more. The crop statistics are municipal and annual, not by farm, so a farm-level response is averaged with the farms that did not buy insurance. Coverage rose and fell with the budget, and the effect is that of first entering the programme. The rainfall grid is half a degree, coarse for small municipalities. The plan also covered rural credit (the Banco Central SICOR data) and the state programmes that add to the federal subsidy; the open credit service did not answer filtered queries and its bulk files exceed what this case downloads, and the state programmes were intermittent and crop-specific, so neither is in this version.

Applied to your business

For a ministry, a state secretariat, a development bank, a cooperative or a foundation with a programme to evaluate, the same steps run on your programme: a panel built from administrative and public data with personal data kept out, the estimator that fits how the programme was rolled out, the test of the identifying assumption and how far it can fail, effects by group and over time, and the power calculation for the next round. It starts with the Data & AI Diagnostic and runs in your environment.

Code

github.com/rhozon/crop-insurance-impact

With Python 3.11 or later, R 4.4 (did, fixest, bacondecomp, HonestDiD) and Node 18 or later:

pip install -e ".[dev,climate]"
python -I tools/fetch_data.py ~/data/crop-insurance        # public data, no account; PSR aggregated while streaming
python -m cix.cli all --data ~/data/crop-insurance
pytest -v                                                  # Python, and the page's JavaScript against it
cd R/tests && Rscript -e 'testthat::test_dir(".")'

The suite has 41 tests (39 in Python, 2 in R): the insurance reader never returns a personal field, the panel and adoption cohorts in SQL, the group-time effects against hand computation and against the R package, the bias of TWFE on simulated data, the SPI against its definition, the power formula against simulation, and the page’s calculator against Python. CI runs them on every push.

References

Data: MAPA, SISSER, Dados do PSR (CC BY); IBGE, Produção Agrícola Municipal (SIDRA 1612) and municipal mesh (Fonte: IBGE); University of East Anglia Climatic Research Unit, CRU TS 4.09 (Open Government Licence v3.0).

  • Cai, J. (2016). The Impact of Insurance Provision on Household Production and Financial Decisions. American Economic Journal: Economic Policy, 8(2), 44-88. doi:10.1257/pol.20130371
  • Callaway, B. and Sant’Anna, P. H. C. (2021). Difference-in-Differences with multiple time periods. Journal of Econometrics, 225(2), 200-230. doi:10.1016/j.jeconom.2020.12.001
  • de Chaisemartin, C. and D’Haultfœuille, X. (2020). Two-Way Fixed Effects Estimators with Heterogeneous Treatment Effects. American Economic Review, 110(9), 2964-2996. doi:10.1257/aer.20181169
  • Goodman-Bacon, A. (2021). Difference-in-differences with variation in treatment timing. Journal of Econometrics, 225(2), 254-277. doi:10.1016/j.jeconom.2021.03.014
  • Guttman, N. B. (1999). Accepting The Standardized Precipitation Index: A Calculation Algorithm. JAWRA Journal of the American Water Resources Association, 35(2), 311-322. doi:10.1111/j.1752-1688.1999.tb03592.x
  • Harris, I., Osborn, T. J., Jones, P. and Lister, D. (2020). Version 4 of the CRU TS monthly high-resolution gridded multivariate climate dataset. Scientific Data, 7(1). doi:10.1038/s41597-020-0453-3
  • Karlan, D., Osei, R., Osei-Akoto, I. and Udry, C. (2014). Agricultural Decisions after Relaxing Credit and Risk Constraints. The Quarterly Journal of Economics, 129(2), 597-652. doi:10.1093/qje/qju002
  • McKenzie, D. (2012). Beyond baseline and follow-up: The case for more T in experiments. Journal of Development Economics, 99(2), 210-221. doi:10.1016/j.jdeveco.2012.01.002
  • Mobarak, A. M. and Rosenzweig, M. R. (2013). Informal Risk Sharing, Index Insurance, and Risk Taking in Developing Countries. American Economic Review, 103(3), 375-380. doi:10.1257/aer.103.3.375
  • Ozaki, V. A. (2008). Em busca de um novo paradigma para o seguro rural no Brasil. Revista de Economia e Sociologia Rural, 46(1), 97-119. doi:10.1590/s0103-20032008000100005
  • Rambachan, A. and Roth, J. (2023). A More Credible Approach to Parallel Trends. Review of Economic Studies, 90(5), 2555-2591. doi:10.1093/restud/rdad018
  • Roth, J. (2022). Pretest with Caution: Event-Study Estimates after Testing for Parallel Trends. American Economic Review: Insights, 4(3), 305-322. doi:10.1257/aeri.20210236
  • Sant’Anna, P. H. C. and Zhao, J. (2020). Doubly robust difference-in-differences estimators. Journal of Econometrics, 219(1), 101-122. doi:10.1016/j.jeconom.2020.06.003
  • Smith, V. H. and Goodwin, B. K. (1996). Crop Insurance, Moral Hazard, and Agricultural Chemical Use. American Journal of Agricultural Economics, 78(2), 428-438. doi:10.2307/1243714
  • Sun, L. and Abraham, S. (2021). Estimating dynamic treatment effects in event studies with heterogeneous treatment effects. Journal of Econometrics, 225(2), 175-199. doi:10.1016/j.jeconom.2020.09.006
WhatsApp ↑