Skip to content

Easily Compute the Relative Belief Ratio, a K-sample Bayesian Test for Mean.

License

Notifications You must be signed in to change notification settings

Ahmad-Alsaleh/relbel

Repository files navigation

relbel relbel website

Conventional Commits License: GPL v3 R-CMD-check Lifecycle: stable

relbel computes the Relative Belief Ratio, a k-sample Bayesian Test for Mean.

Installation

You can install the development version of relbel from GitHub with:

install.packages("devtools")
devtools::install_github("Ahmad-Alsaleh/relbel")

Example

library(relbel)
set.seed(42)

initialization_function <- function(feature) {
  list(a = 0, b = 2, s_1 = 2, s_2 = 4)
}
repetition <- 5000
L <- 20
i_0 <- 1

dataset <- data.frame(
  x1 = c(-0.8606568, 1.4141698, 0.2235239, -1.1968656, 0.7677741),
  x2 = c(-0.318, -0.712, -1.320, -0.008, 0.048),
  y = c("A", "B", "A", "B", "B")
)

relbel(
  dataset[1:2], dataset["y"],
  initialization_function, repetition, L, i_0
)
#>              x1     x2
#> relbel   0.9400 1.1240
#> strength 0.2592 0.7596

About

Easily Compute the Relative Belief Ratio, a K-sample Bayesian Test for Mean.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages