For a GLM family with variance function V(mu), link function g, and dispersion parameter phi, the sampling standard deviation of the MLE on the link scale is: sigma(eta) = sqrt(phi * V(mu)) / |dmu/deta| where mu = linkinv(eta + offset).
sigma_from_family(eta, family, offset = 0, phi = 1)Numeric vector of sigma values (same length as eta).
Numeric vector of values on the link scale (parameter of interest).
An R family object (e.g., binomial(), MASS::negative.binomial(0.5)).
Numeric scalar. Shift applied before evaluating the variance function. For NB/Poisson with log link, this is log(exposure). Default 0.
Numeric scalar. Dispersion parameter. For gaussian family this is sigma^2 (user-supplied). For binomial/NB/Poisson this is 1 (the default).