I have estimated several glms with cluster robust standard errors using the function glm.cluster() from the miceadds package in R.
Unfortunately, the function does not automatically calculate a pseudo R-squared.
Moreover, I am unable to find a package for calculating a pseudo R-squared that is compatible with glm.cluster. So far, I have tried rcompanion's nagelkerke(), fmsb’s NagelkerkeR2() and even psfmi's rsq_nagel().
Did anyone else face this problem before and do you know how to resolve it without writing one's own function?
glm.clusterreturns a two-element list, the first element of which (called$glm_res) is the actualglmfit. I usedperformance::r2_nagelkerke()because that was what I had handy, but any Nagelkerke R2 function will probably work if you apply it to the$glm_rescomponent.Set up example: