Closed aaraujo-lih closed 8 years ago
I located the offending piece of code in predictInterval
and my guess is that it results from the combination of using the colon syntax for interactions (1|Patient:Cycle) and not including all of the factor levels in one of the interaction variables.
Should be fixable, just need to fix the way we have been assembling terms. I will let you know what I find.
Dear carlbfrederick,
Many thanks.
That makes sense. If I supply the full dataset to the 'newdata' argument it works. However in my case I am interested in the individual difference between treatments while keeping all the other variables constant. This is the same regardless of the Cycle I choose. Using all the factor levels will be a waste of computational time and memory resources.
Wish you good luck on finding a quick solution.
I have patched this issue on a separate branch for now. The reproducible example you supplied works as intended. You can install it using
devtools::install_github("jknowles/merTools", ref="issue53")
Let us know if you run into any issues due to this patch. I will leave this issue open until it has been throughly tested and is merged back onto the main branch.
Cheers!
Dear carlbfrederick,
Thanks a lot.
It seems to be working now. The full code I am using is attached.
It is also working when I use all the levels of the factors to compute the predictions.
closed by branch Issue53
I am getting the following error from predictInterval:
This is the code:
Either I am using 'predictInterval' the wrong way or this is a bug. This works with 'predict' from 'lme4' package. If I input the full data.frame to the 'newdata' argument it works. But that is not what I intend.