One fit, or an array of fits to compare.
const y = [0, 0, 1, 0, 1, 1];
const fit0 = glm([[], [], [], [], [], []], y, { family: "binomial" });
const fit1 = glm([1, 2, 3, 4, 5, 6], y, { family: "binomial" });
const a = glmAnova(fit1);
a.colNames; // ["Df", "Deviance", "Resid. Df", "Resid. Dev", "Pr(>Chi)"]
a.table[1]; // [1, 3.3618, 4, 4.956, 0.066725]
glmAnova([fit0, fit1], { test: "LRT" }).table[1]; // [4, 4.956, 1, 3.3618, 0.066725]
Analysis of deviance, for one
glmfit (the sequential table, each column ofxadded in order) or for several fits of the same data (anova(fit1, fit2, ...)). Equivalent to R'sanova().