Skip to content
New issue

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

The BF turns from Inf to NaN with increasing Test value in a one-sample t-test #31

Open
koenderks opened this issue May 24, 2021 · 0 comments

Comments

@koenderks
Copy link

koenderks commented May 24, 2021

Sometimes, depending on the test value in a one-sample t-test, the Bayes factor turns from Inf to NaN. An example can be found below. I'm not sure how to handle this on the R side though, maybe you have some ideas?

data("sesamesim")

set.seed(100)
testValue <- 36
test <- bain::t_test(x = sesamesim$age)
b1 <- bain::bain(x = test, hypothesis = paste0("x=", testValue, "; x>", testValue, "; x<", testValue), fraction = 1)
BF_02_1 <- b1$BFmatrix[1,3]
BF_02_1

[1] 718.2452

set.seed(100)
testValue <- 35.5
test <- bain::t_test(x = sesamesim$age)
b2 <- bain::bain(x = test, hypothesis = paste0("x=", testValue, "; x>", testValue, "; x<", testValue), fraction = 1)
BF_02_2 <- b2$BFmatrix[1,3]
BF_02_2

[1] Inf

set.seed(100)
testValue <- 35
test <- bain::t_test(x = sesamesim$age)
b3 <- bain::bain(x = test, hypothesis = paste0("x=", testValue, "; x>", testValue, "; x<", testValue), fraction = 1)
BF_02_3 <- b3$BFmatrix[1,3]
BF_02_3

[1] NaN

See also https://github.com/jasp-stats/jasp-test-release/issues/1252

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant