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

lmer and glmer - problems if grouping variable is a factor with <3 data points per group #288

Open
tombisho opened this issue Oct 12, 2020 · 1 comment
Milestone

Comments

@tombisho
Copy link
Contributor

lmer and glmer conver their model into a standard glm model and run the standard glm checks

so depression ~ age + (1|child_id) gets converted into depression ~ age + child_id and the glm checks run.

This is OK if child_id is an integer (quite likely because it will be in Opal unless someone has created a level for each individual!?). If child_id is a factor with ~<3 observations, then the glm checks fail.

If child_id is an integer, why can it not be converted to an integer? There do not appear to be checks to stop this is in asIntegerDS?

Otherwise, we could change the serverside lmer and glmer functions to strip the grouping factors before running the glm checks. We already don't return per id coefficients so this should not cause concerns.

@tombisho
Copy link
Contributor Author

Factors can be converted to integers to solve this - confirmed by Tim. But long term it might be nice to remove the factor from the glm checks so that users can supply a factor or an integer

@StuartWheater StuartWheater added this to the v6.4 milestone Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants