Description
Extra Canonical Link Family Objects for Generalized Linear Models.
Description
Extra family objects in "weird" scenarios, particularly logistic or log-linear model with unbounded or non-binary/non-integer outcomes. Provides binomial_extra() and poisson_extra() as generalizations of binomial() and poisson(). The use of canonical link with the corresponding working likelihood in glm() ensures convexity, making model fitting reliable and independent of starting value. Robert WM Wedderburn (1974) <doi:10.1093/biomet/61.3.439> and Peter McCullagh (1983) <doi:10.1214/aos/1176346056> justified this method to fit generalized linear (mean) models with quasi-/working likelihood.
README.md
CanonicalFamilyExtra
Extra Canonical Link Family Objects for Generalized Linear Models (R package)
To install from Github:
devtools::install_github("Qiu-Hongxiang-David/CanonicalFamilyExtra")
Example:
library(CanonicalFamilyExtra)
x <- rnorm(100)
y <- 1/(1 + exp(-x)) + rnorm(100)
# fit logistic model
glm(y~x, family = binomial_extra())
# fit log-linear model
glm(y~x, family = poisson_extra())
More naive approaches appear not working.