Skip to content

Instantly share code, notes, and snippets.

@mcfrank
Created February 16, 2022 17:44
Show Gist options
  • Select an option

  • Save mcfrank/de98e63cea5198af5c0bda1edd651564 to your computer and use it in GitHub Desktop.

Select an option

Save mcfrank/de98e63cea5198af5c0bda1edd651564 to your computer and use it in GitHub Desktop.
using BFpack
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