Consider a situation where I want to predict a binary health outcome for patients with various medical conditions, who are treated at different hospitals. I want to use patients' medical conditions as predictors, and it is the coefficients & confidence intervals for these conditions that I care most about (i.e. I don't care so much about differences between these specific hospitals). So it seems like a perfect situation to treat hospital as a random effect (random-intercepts model), e.g.
glmer(outcome ~ conditionA + conditionB + ... + (1 | hospital), family="binomial")
However, patients' medical conditions may very well be correlated with hospital, because patients in the most serious condition are more likely to be sent to some hospitals than others. The amount of multicollinearity here is not super-strong -- the VIF of 'hospital' in a model where hospital is treated as a fixed effect is 3.25 if all potentially relevant conditions are included as independent variables, and under 1.5 if LASSO or stepwise regression is used to exclude nuisance variables -- but it's not nothing.
With that background, I am trying to determine whether it makes more sense to treat hospital as a random or fixed effect in this instance. As noted in this question,
The random effects assumption is that the individual unobserved heterogeneity is uncorrelated with the independent variables. The fixed effect assumption is that the individual specific effect is correlated with the independent variables.
An answer to how to test for this advised extracting the random effects in R via ranef and "plotting them against the predictors". To be clear: is it true that in my case, a recommended approach would be to get the random effect for each hospital from a model where hospital is treated as a random effect; then to get the coefficients for each hospital from a model where hospital is treated as a fixed effect; and then checking if the hospital (fixed-effect) coefficients are significantly correlated with the random effects? Is this roughly equivalent to conducting a Hausman test to decide whether to treat a variable as a fixed or random effect, as described on slide 16 here?
Finally, irrespective of correlations between observed variables, is this a situation for a fixed-effects rather than random-effects model merely on the theoretical grounds that there are unobserved variables underlying the fact that people with more serious medical conditions are more likely to wind up at some hospitals than others (e.g., differential availability of acute services at different hospitals)?