statdivlab / raoBust

Generalized Linear Models with robust and non-robust Wald and Rao (score) tests
Other
6 stars 4 forks source link

Add option for Firth-penalty for fitting GLM using `brglm2` package #12

Open svteichman opened 3 months ago

svteichman commented 3 months ago

Look into stability of brglm2, then add as an option (replacing glm.fit with brglm.fit as needed) for running glm to adding Firth penalty functionality. This will require a bit of craftiness to go from a design matrix (what raoBust uses to drop a column to estimate under the null) to a formula and data object (what brglm expects).

adw96 commented 3 months ago

@svteichman I'm just chatting w David and he confirmed he had no issues with brglm2. I was thinking of logistf, which we had significant issues with when implementing happi.

David did say brglm2 breaks/takes ages for multinomial logistic regression with many categories (large $J$), such as we see in radEmu-type problems.

adw96 commented 3 months ago

I think a next step after #15 is to implement a Firth penalty for multinomial as well. From there I think we will mostly have what we need to share this with the collaborator who requested it 🥳