jomulder / BFpack

BFpack can be used for testing statistical hypotheses using the Bayes factor, a Bayesian criterion originally developed by sir Harold Jeffreys.
https://bfpack.info/
14 stars 4 forks source link

Verzoek tot aanpassingen #13

Closed cjvanlissa closed 4 years ago

cjvanlissa commented 4 years ago

De volgende punten hebben aandacht nodig:

package naam moet eigenlijk in kleine letters, omdat mensen (voordat het geinstalleerd is) nog niet weten waar hoofdletters staan

Welk algoritme gebruikt is moet in output van BF(). BF gebruikt nu achter de schermen verschillende algoritmes, toch?

Veel van de test_that tests testen in feite niets. Je moet voor elke test dit toevoegen:

    test_that("wat je checkt", {de code die je nu al gebruikt, zoals expect_equivalent})

test_hetcor.R

Deze test geeft niet de resultaten die je verwacht:

test_that("Hetcor two hypotheses correctly evaluated", {expect_equivalent(round(unname(BF2$BFtu_confirmatory),6),c(1.614833,13.796779,0.911219))}) Error: Test failed: 'Hetcor two hypotheses correctly evaluated'

  • round(unname(BF2$BFtu_confirmatory), 6) not equivalent to c(1.614833, 13.796779, 0.911219). 3/3 mismatches (average diff: 0.113) [1] 1.624 - 1.615 == 0.00876 [2] 14.125 - 13.797 == 0.32849 [3] 0.911 - 0.911 == -0.00071

BF.hetcor geeft een error als je maar één hypothese meegeeft. Kan je dit debuggen?

set.seed(564) BF3 <- BF(res,hypothesis="Middle_with_Superficial > Deep_with_Superficial")