runehaubo / lmerTestR

Repository for the R-package lmerTest
48 stars 9 forks source link

Error in rand(fm1) : could not find function "rand" #14

Closed nmjakobsen closed 5 years ago

nmjakobsen commented 5 years ago

Using lmerTest version 3.0-1 with R version 3.5.1, I encounter the above error when running the following code:

library(lmerTest)
fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)
ranova(fm1) # Works
rand(fm1) # Doesn't work

According to the ranova help page, rand is an alias for ranova, so as far as I can see, the last line of code should generate the same output as the previous line.

Kind regards, Nina

runehaubo commented 5 years ago

Indeed you should get the same results for rand as for ranova (and you would if you used lmerTest:::rand(fm1)). Unfortunately a simple export statement was missing and embarrassingly rand was not explicitly tested :-(. Installing version 3.0-1.9003 of lmerTest (devtools::install_github("runehaubo/lmerTestR")) which I am committing shortly should solve this issue.

Thank you for raising this issue.

Cheers Rune