REsim not working
fcorowe opened this issue · comments
Hi,
I am running the example in the R documentation for REsim
i.e.
require(lme4)
m2 <- lmer(Reaction ~ Days + (Days | Subject), sleepstudy)
re2 <- REsim(m2, 25)
and the output is:
Error in getMethod("solve", signature(a = "CHMfactor", b = "diagonalMatrix")) :
no method found for function 'solve' and signature CHMfactor, diagonalMatrix
I ran showMethods(REsim)
and produced
Function "REsim":
<not an S4 generic function>
Any ideas of what is going wrong and I could fix this issue?
Thanks,
Francisco.
Experiencing the same issue. Traced it to this line of the function:
mysim <- arm::sim(merMod, n.sims = n.sims)
which returns the same error:
Error in getMethod("solve", signature(a = "CHMfactor", b = "diagonalMatrix")) : no method found for function 'solve' and signature CHMfactor, diagonalMatrix
Issue fixed by reinstalling the arm
package. Perhaps update merTools
to include dependency checks?
The arm
package is a strict dependency of merTools
and should be installed when installing the package. I'm not sure what installation path allows the package to install without the dependency, or it could be an issue with calling the functions from merTools
without loading the package first. Either way, we are already doing dependency checks. Thanks for the report!