Add Firth logistic regression to BAS

Open
#63 0 comments 0 reactions 1 assignee View on GitHub

@merliseclyde is already working on this.

Since Nov 9, 2022.

Assessment

This issue has not been assessed yet.

Description

enhancement help wanted

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} = h_i /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:

  • need to fix issue related to incorrect standard errors in weighted regressions and GLMS - issue #52
  • should weights be based on full model or different for each model. (seems like model dependent ideal)
  • can data augmentation be based on adding $n$ observations through sufficiency? i.e add proportion 0.5 and weights $w_i = h_i$?
  • should require iterative updating to get MLE's but should be feasible with current iteratively weighted least squares implentation for logistic regression

of interest for JASP @vandenman ?

Dominant language
C
Stars
47
Forks
19
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from merliseclyde/BAS

All issues in merliseclyde/BAS

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.