Created
February 16, 2022 17:44
-
-
Save mcfrank/de98e63cea5198af5c0bda1edd651564 to your computer and use it in GitHub Desktop.
using BFpack
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(tidyverse) | |
| library(BFpack) | |
| n <- 12 | |
| kat_data <- tibble(condition = c(rep("reliable", n), | |
| rep("unreliable", n)), | |
| harder = c(rbernoulli(n, p = .8), | |
| rbernoulli(n, p = .3))) | |
| kat_data %>% group_by(condition) %>% summarise(mean_harder = mean(harder)) | |
| mod <- glm(harder ~ condition, family = "binomial", data = kat_data) | |
| summary(mod) | |
| BF(mod) | |
| BF(mod, hypothesis = "condition < 0") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment