Closed LukasWallrich closed 3 years ago
Thanks for noting this. To be honest, I don't really use weights in my own research, so this was simply something I never looked into. But your proposed change seems to fix the issue. Looks like it also impacts lm
models in the same way, but interestingly, not nlme
models.
Anyway, I will take a look at see whether there are other places where weights may be an issue, and hopefully push an update within the next week or so. Thanks again!
When I try to use simple_slopes on a lmer-model with weights, it fails with an object not found error. I think this is because the call inside the function contains the reference to the original weights variable, while
mdata
contains a(weights)
variable instead.Maybe all that is needed is this line in
simple_slopes.merMod
?Minimal example:
I just found the following workaround, but would be ideal if it worked with the original variable names.