View source: R/sigma_from_family.R
| sigma_from_family | R Documentation |
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)
eta |
Numeric vector of values on the link scale (parameter of interest). |
family |
An R family object (e.g., binomial(), MASS::negative.binomial(0.5)). |
offset |
Numeric scalar. Shift applied before evaluating the variance function. For NB/Poisson with log link, this is log(exposure). Default 0. |
phi |
Numeric scalar. Dispersion parameter. For gaussian family this is sigma^2 (user-supplied). For binomial/NB/Poisson this is 1 (the default). |
Numeric vector of sigma values (same length as eta).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.