This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize for the AI-speak, we are working on rewriting it!
viv-lang.org

Notebooks · lib/stats/gallery_longley

Least squares on NIST's Longley data, drawn

A smaller version of the figure of vipyr's gallery example plot_nist_linear_regression.py, drawn in Viv. vipyr's figure compares the certified digits of eleven NIST StRD datasets across libraries; this program takes the hardest well-known one, Longley (16 observations, 6 predictors and a constant, nearly collinear), and fits it by the four solvers in lib/stats/linmod.viv. A bar is the number of digits of the worst coefficient that agree with NIST's certified values (the log relative error, capped at 15 as in lib/stats/nist_lls.py). The data and the certified values are NIST's (itl.nist.gov/div898/strd/lls/data/Longley.shtml), copied below.

Look inside this program

  • Atlas

    The program’s map: every function and which calls which.

  • There’s no recorded run of this program yet.

Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.

[1]lines 16–92