I ran into an error whereby if you pass lmBF a tibble (e.g. as output by dplyr), one receives an error like:
result <- lmBF(y~x1*x2, dat)
Error in checkFormula(formula, data, analysis = "lm") :
Dependent variable must be numeric.
The dependent variable is numeric, and shows as such in any way you care to view the data.
The error can be fixed by explicitly changing the tibble to a dataframe:
result <- lmBF(y~x1*x2, as.data.frame(dat))
It would be good if the BayesFactor package could handle this internally, because the error message is rather cryptic and if one inspects the object, the dependent variable is indeed numeric. I don't know however, if this is a problem on your side or with tibble.
I ran into an error whereby if you pass
lmBF
a tibble (e.g. as output bydplyr
), one receives an error like:The dependent variable is numeric, and shows as such in any way you care to view the data.
The error can be fixed by explicitly changing the tibble to a dataframe:
It would be good if the BayesFactor package could handle this internally, because the error message is rather cryptic and if one inspects the object, the dependent variable is indeed numeric. I don't know however, if this is a problem on your side or with tibble.