We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In the example below, shape:color and color:shape should be one term (same for color:shape:ID and shape:color:ID):
shape:color
color:shape
color:shape:ID
shape:color:ID
library(bayestestR) library(lme4) data("puzzles", package = "BayesFactor") puzzles <- as.data.frame(lapply(puzzles, function(x) rep(x,5))) puzzles$RT <- puzzles$RT + rnorm(240) m1 <- lmer(RT ~ shape + shape:color + (shape + shape:color|ID), puzzles) m2 <- lmer(RT ~ color + shape:color + (color + shape:color|ID), puzzles) m3 <- lmer(RT ~ color:shape + (color:shape|ID), puzzles) x <- bayesfactor_models(m1,m2,m3) bayesfactor_inclusion(x) #> # Inclusion Bayes Factors (Model Averaged) #> #> Pr(prior) Pr(posterior) Inclusion BF #> shape 0.33 0.5 2 #> shape:color 0.33 0.5 2 #> 1:ID 1.00 1.0 NaN #> shape:ID 0.33 0.5 2 #> shape:color:ID 0.33 0.5 2 #> color 0.33 0.5 2 #> color:shape 0.67 0.5 0.5 #> color:ID 0.33 0.5 2 #> color:shape:ID 0.67 0.5 0.5 #> #> * Compared among: all models #> * Priors odds: uniform-equal
Created on 2019-09-10 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered:
bug fix
0c3aba9
#223
Fixed
library(bayestestR) library(lme4) data("puzzles", package = "BayesFactor") puzzles <- as.data.frame(lapply(puzzles, function(x) rep(x,5))) puzzles$RT <- puzzles$RT + rnorm(240) m1 <- lmer(RT ~ shape + shape:color + (shape + shape:color|ID), puzzles) m2 <- lmer(RT ~ color + shape:color + (color + shape:color|ID), puzzles) m3 <- lmer(RT ~ color:shape + (color:shape|ID), puzzles) x <- bayesfactor_models(m1,m2,m3) bayesfactor_inclusion(x) #> # Inclusion Bayes Factors (Model Averaged) #> #> Pr(prior) Pr(posterior) Inclusion BF #> shape 0.33 0.5 2 #> color:shape 1.00 1.0 NaN #> 1:ID 1.00 1.0 NaN #> shape:ID 0.33 0.5 2 #> color:shape:ID 1.00 1.0 NaN #> color 0.33 0.5 2 #> color:ID 0.33 0.5 2 #> #> * Compared among: all models #> * Priors odds: uniform-equal
Sorry, something went wrong.
No branches or pull requests
In the example below,
shape:color
andcolor:shape
should be one term (same forcolor:shape:ID
andshape:color:ID
):Created on 2019-09-10 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: