Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robustifying standard errrors by cluster variable in logistic regression #888

Open
redecker-m opened this issue Jan 23, 2023 · 0 comments
Open

Comments

@redecker-m
Copy link

I need to adapt my logistic regression model for making robust standard errors with respect to a clustering variable (e.g. having data on employees but additional explanatory variables referring to the company). In Stata, this is a direct option 'VCE cluster' applied on glm model.
In R there seem to be very different libraries dealing with that problem, like 'sandwich'+ 'lmtest' or 'rms' or 'miceadds', but all dealing with a singular alternated 'glm' model - instead of a combined learner-task scheme.
For examples, see:
https://github.com/danilofreire/r-scripts/blob/master/robust-se-for-lm-and-logit.R
https://stackoverflow.com/questions/16498849/logistic-regression-with-robust-clustered-standard-errors-in-r

I did not see any option for 'classif.logreg' to include robustness by cluster variables, neither a feature in 'mlr3pipelines'. Is there any way to deal with it directly in mlr3?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant