What each test checks against
In these tools the arithmetic is kept in its own script block, apart from the code that draws the page. The test file runs that block under Node and compares its results with values computed elsewhere.
-
Causal Inference Workbench
Two-way fixed effects with cluster-robust errors, the wild cluster bootstrap and the Goodman-Bacon decomposition, compared with Python on two panels: one with few clusters and one with staggered adoption. My bootstrap counts the sign patterns that reproduce the original t-statistic, so its p-value cannot be zero. The
wildboottestpackage leaves them out, so the two differ by exactly 2/2G, and the test checks for that difference. -
Regression Discontinuity
A JavaScript port of the default path of rdrobust 2.1.1, by Calonico, Cattaneo, Farrell and Titiunik: the sharp design, local linear fits with a triangular kernel, the MSE-optimal bandwidth and robust bias-corrected intervals. Because it ports GPL-3.0 code, this one tool is licensed GPL-3.0; the rest of the site is MIT. The bandwidths, all three estimates, the standard errors, p-values and intervals are compared with rdrobust itself on seven data sets: Lok Sabha seats from 2019 to 2024 built from the Election Commission's results, the US Senate elections data rdrobust ships, a simulated design, integer test scores where rdrobust's adjustment for repeated values applies, data with ties just short of the share at which that adjustment starts, and two built so that the rules limiting the pilot bandwidths come into force. They agree to 1e-8. Two other limits in the selector are not tested, because none of the seven data sets makes them bind.
-
Poverty & Inequality Explorer
The tool fits Datt's (1998) General Quadratic and Beta Lorenz curves to ten decile shares and computes inequality and poverty measures from the fitted curve. The measures are compared with closed forms for a Pareto distribution, which has exact formulas for its Gini, Theil, Atkinson, FGT and Watts measures. The fits must give back the parameters of curves they were generated from, and must reject a Beta curve that is not a valid Lorenz curve.
The tool is also compared with PIP. For eight countries, the Gini from ten decile shares is within 0.003 of the Gini PIP computes from the survey microdata. The headcount is within 2.5 points when the poverty line is in the middle of the distribution. When the line falls in the poorest tenth, ten shares say nothing about how incomes are spread there: for Bangladesh in 2022 at $3.00 a day the headcounts agree (6.1% against 5.9%) but the tool's poverty gap is 0.56% where PIP's is 0.97%, and for the United States at the same line the tool gives a headcount of 0% where PIP gives 1.4%. The test found this, and the tool now shows a warning for any line in the poorest tenth.
-
Wage Gap Decomposition
Both groups' wage regressions with HC1 standard errors, and the Oaxaca-Blinder decomposition with four choices of reference coefficients plus the three-fold version, compared with statsmodels on 1,500 simulated workers. The simulated workers are Indian regular wage earners: the share of women and the mean monthly earnings of men and women are set from PLFS 2024, and the rest of the wage equation is invented and labelled so. statsmodels' option labelled Neumark gives the same answer as its pooled regression with a group dummy, so Neumark's version without the dummy is compared with a separate least-squares calculation in numpy.
Test: wage-gap/tests/core.mjs
-
Multiple Outcomes & Attrition Bounds
Bonferroni, Holm and Benjamini-Hochberg adjustments compared with statsmodels. Sharpened q-values compared with a Python routine written from Benjamini, Krieger and Yekutieli (2006). Lee bounds compared with a Python routine that computes the trimmed mean a different way, and with small cases worked by hand.
-
Sampling Design
Design effect, finite population correction, response-rate inflation, stratum caps, certainty selections and second-stage probabilities, compared with values computed in Python. The probability-proportional-to-size draw is compared with a second implementation written inside the test.
-
Multidimensional Poverty
The Alkire-Foster headcount, intensity and adjusted headcount, compared with values worked out as exact fractions. One case has weights of 0.7, 0.1, 0.1 and 0.1, which a computer adds to 0.9999999999999999, to check that a household exactly on the cutoff is counted as poor.
-
Fiscal Incidence
Concentration coefficients and Kakwani indices, using the sign conventions of the Commitment to Equity handbook. The test uses income groups of unequal size, because with ten equal deciles an error in weighting by population does not change the answer.
-
Child Growth z-scores
z-scores from the WHO growth standards, compared with 360 measurements WHO prints at −4 to +4 standard deviations in its expanded tables. Each one has to come back as its whole-number z-score.
-
Robustness Value
Cinelli and Hazlett's sensitivity analysis for omitted variables, compared with the Darfur example in their 2020 paper, with t quantiles from scipy, and with PySensemakr on the page's own example. That example is a regression across 34 Indian states from NFHS-6: stunting on women's schooling. A confounder as strong as drinking water leaves the estimate standing, and rural consumption, which the regression leaves out, takes it to two fifths of its size and out of significance. With one omitted variable the bias formula is exact, and the test checks that it reproduces the longer regression to ten decimal places. I used this method in place of Oster's delta because the reference code for delta is the Stata command
psacalc, and I had no Stata to compare against. -
Unpaid Care Valuation and Rupee Converter
Both tools carry data. The tests compare it with the source files: MoSPI's published time-use and wage figures for the first, and the CPI and PPP series from MoSPI and the World Bank for the second.
Tests: care-valuation/tests/core.mjs, rupee-converter/tests/core.mjs
To see whether a test can fail, I broke the code on purpose, one change at a time, and confirmed the test failed each time. The repository's notes record 171 such changes across these suites.
State figures from unit-level survey data
MoSPI's API gives Time Use Survey figures for All India only. The state figures in Unpaid Care Valuation were therefore computed from the 2024 unit-level file, which MoSPI distributes in Nesstar format without a published file layout. The script records the layout I worked out, and it writes nothing unless its All India results match the eight figures MoSPI publishes.
In the 2019 file the start and end time of every activity is blank, across all 9,436,777 diary rows, so the 2019 minutes come from the published report. The 2019 wages come from the person files of two PLFS rounds. They match MoSPI's quarterly figures to within 0.15% for regular wages and 1.75% for casual wages.
Some state wages in PLFS rest on very few workers. The casual wage for women in Chandigarh and in Mizoram each comes from one woman in the sample. The tool counts the workers behind every wage and does not use a wage based on fewer than 30.
The unit-level files are not in the repository. They are large and they are row-level survey data. The scripts are there for anyone who gets the files from MoSPI.
API keys and outside code
The Court Petition Translator uses Sarvam AI and Groq, and the read-aloud in Little K uses Sarvam AI. The keys for both are held in a Netlify server function and are never sent to the browser. Until October 2026 that function accepted requests from any website. It now accepts requests only from this site.
The site's Content-Security-Policy lists the outside addresses a page is allowed to load or contact. A check compares that list with what the pages load. It found 19 addresses that no page used, and I removed them. Scripts loaded from a CDN are pinned to an exact file, and a weekly job confirms each file has not changed.
Accessibility
Every page is audited with axe at phone and desktop widths, on every change. The first audit, in September 2026, found 573 serious or critical problems. Most were form fields with no label a screen reader could use, and grey text below the contrast minimum. Three pages also scrolled sideways on a phone. All of them are fixed.
Bugs that showed no error
- The Flipbook Maker never worked. A
</script>inside a JavaScript string ended the page's script early, so none of its code ran, and the page still looked normal. A check now parses every script on every page. - Groq withdrew the model the translator used on 16 August 2026. For two months the translator gave the unrefined translation with a small note. Around the same time Sarvam renamed a field in its speech API, and read-aloud stopped working. Both were fixed on 19 October 2026. Nothing yet watches for this automatically.
- The Little K phonics lessons asked children to read words with letters the course had not taught yet. I found it by sitting with a child. A browser test now goes through every lesson and fails on any word with an untaught letter.
Not yet done
- Several older tools, including the cost-benefit calculator, the RCT planner, the survey audit and the legal calculators, were checked against worked examples when they were built. Those checks are not automated yet.
- The bootstrap standard errors in the wage-gap tool are not tested against another implementation.
- The 2024 standard errors in Unpaid Care Valuation ignore the survey's stratification, so they cannot be compared directly with MoSPI's 2019 errors.
- I am still reading the "known limits" note on each tool card against the tool.