Diagonal of the hat matrix of the last weighted least squares step, for the rows of non-zero prior weight, for a glm fit. Equivalent to R's hatvalues().
glm
hatvalues()
const fit = glm([1, 2, 3, 4, 5, 6], [0, 0, 1, 0, 1, 1], { family: "binomial" });glmHatvalues(fit); // [0.28361, 0.37762, 0.33877, 0.33877, 0.37762, 0.28361] Copy
const fit = glm([1, 2, 3, 4, 5, 6], [0, 0, 1, 0, 1, 1], { family: "binomial" });glmHatvalues(fit); // [0.28361, 0.37762, 0.33877, 0.33877, 0.37762, 0.28361]
Diagonal of the hat matrix of the last weighted least squares step, for the rows of non-zero prior weight, for a
glmfit. Equivalent to R'shatvalues().