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_glm

A probit fit to mtcars, drawn

The first figure of vipyr's gallery example plot_glm_probit.py, drawn in Viv: R's mtcars data, engine shape (vs, 0 for V-shaped, 1 for straight) against miles per gallon, fitted by a binomial GLM with the probit link through glm_irls in lib/stats/glm.viv, and the fitted probability Phi(b0 + b1 mpg) over the data. The coefficients and the deviance are checked against R 4.3.3's glm(vs ~ mpg, family = binomial(link = "probit"), data = mtcars) with epsilon = 1e-12.

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 14–60