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

check_model() bugged for lmer models *only* when run as part of an RMD chunk #720

Closed
dpmoriarity opened this issue May 15, 2024 · 3 comments
Labels
reprex 📊 We need a reproducible example for further investigation waiting for response 💌 Need more information from people who submitted the issue

Comments

@dpmoriarity
Copy link

dpmoriarity commented May 15, 2024

Running check_model for a project and it works fine for lm() models in rRunning check_model for a project and it works fine for lm() models in RMD chunks but, when I transition to lmer, the figure seems bugged when I run it in an RMD chunk but works fine when it is run outside of a chunk

check_model broken code chunk
check_model working fine_not as part of chunk

@strengejacke
Copy link
Member

I#m not sure what the two plots mean or where they come from. What is exactly the bug you get? Do you have a reprex, e.g. the raw RMD script?

@strengejacke strengejacke added waiting for response 💌 Need more information from people who submitted the issue reprex 📊 We need a reproducible example for further investigation labels May 20, 2024
@dpmoriarity
Copy link
Author

The top image shows the bugged output when the check_model() is ran as part of a chunk, the one below shows the non-bugged output when the exact same code is run outside of a chunk.

I've attached some data and reproducible code. oddly, this inconsistency does not come up when using data that is part of the lmer package, but it does with the project data.

I've included a) the project data and b) a knitted file with both the public data + the project data. Lmk if I can do anything else to help!

Check_model_troubleShoot.csv
check_model_chunkedcodebug-reprex.docx

@dpmoriarity
Copy link
Author

I was able to fix the issue by changing the beginning of the chunk to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reprex 📊 We need a reproducible example for further investigation waiting for response 💌 Need more information from people who submitted the issue
Projects
None yet
Development

No branches or pull requests

2 participants