Projpred: Interactions without marginal terms?

I will create an issue, but let me first better understand what is going on. I have one observation per subject, so I never thought of using (stan)_glmer with (1|subject_id). When I try this with glmer/lme4, Doug yells at me

In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.0167366 (tol = 0.002, component 1)

and I do fully understand his anger, since there simply is no variance material to hammer upon. stan_glmer works, but I am not surprised that the (1|subject_id) terms ends up last in varsel; the results otherwise look ok. So it is unclear why you did not think someone would use _glm for this. Is using glmer with a orphaned (1|subject_id) the better choice?

The example shown in the original posting looks like this with stan_glmer, which is much more reasonable.

   size          solution_terms elpd elpd.se
2     0                    <NA> -104     2.1
3     1                op_group  -95     4.4
4     2            reflux_preop  -92     4.8
5     3          z_weight_preop  -91     5.0
6     4 op_group:z_weight_preop  -88     5.3
7     5                z_age_op  -88     5.4
8     6       op_group:z_age_op  -84     5.6
9     7   op_group:reflux_preop  -84     5.6
10    8        (1 | subject_id)  -84     6.4

1 Like