Closed mkshaw closed 3 years ago
broom::augment() is fine for r2mlm, but for r2mlm_comp it doesn't pull all variables like fortify.merMod() does, which creates the issue that models A and B have to be hierarchical.
For now, if a user pre-treats their data with data <- na.omit(data)
and then runs their model in lme4 or nlme, that gets around the missing data issue.
From an email:
"fortify.merMod does not address the missing data (see here a similar issue: https://github.com/lme4/lme4/issues/390). In that issue, an alternative approach to pull the data while addressing the missing data is proposed: data <-broom::augment(model)"
Try using broom::augment(model), see if results are as expected.