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

plotResiduals() - automatically handle NA and extend form = ~ #425

Open
florianhartig opened this issue Jul 19, 2024 · 1 comment
Open
Milestone

Comments

@florianhartig
Copy link
Owner

plotResiduals() should get an update. There are two main issues:

  1. function should be able to use variables from the model, instead of the global environment
  2. this should then also take care of NA issues from users, such as in DHARMa: residuals and predictor do not have the same length.  #424
@florianhartig
Copy link
Owner Author

@melina-leite given the large number of people that have problems with this, I would see this as priority for the 0.4.8 release!

My ideal solution would be to copy the syntax (possibly also the code) from the lme4 plot.merMod command, where one can say

form = res ~ variable | group

where

  1. res allows to specify different residual definitions
  2. variable is the variable on x
  3. group allows to create several plots per group

Cases 1 and 3 could also be done later. About 3: lme4 uses the lattice framework for the group plots - I'm not sure if I like this visually, because it breaks with our other graphics, but I guess that a solution via par(mfrow = c()) for creating several panels will be much more fragile (in particular regarding this error if the plot window is not large enough).

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

No branches or pull requests

2 participants