merliseclyde / BAS

BAS R package for Bayesian Model Averaging and Variable Selection
https://merliseclyde.github.io/BAS/
GNU General Public License v3.0
42 stars 16 forks source link

Add Firth logistic regression to BAS #63

Open merliseclyde opened 2 years ago

merliseclyde commented 2 years ago

Separation is a current problem with bas.glm in logistic regressions as which uses nested integrated Laplace approximations which depend on MLEs. With quasi or perfect separation, MLEs are not identifiable, which Firth Logistic regression addresses through data augmentation or equivalently a penalty term using Jeffreys invariant prior.

For DA, an augmented data set with $3n$ observations is constructed with stacking the design matrix 3 times and a response vector that is (the original Y, a nx1 vector of 1's, and a nx1 vector of 0's). The augmented response are accompanied by weights: $w_{i} = hi /2$ where $$H = W^{1/2}X(X^TWX)^{-1}X^TW^{1/2}$$ and $W$ is a diagonal matrix with $[W]{ii} = \pi_i ( 1 - \pi_i)$.

Questions in implementation:

of interest for JASP @vandenman ?