tidyBayesTest.RdWrapper for bayesTest which returns a tidy table instead of a messy list
tidyBayesTest(A_data, ...)
# S3 method for bernoulli
tidyBayesTest(A_data, B_data, priors, n_samples = 1e+05, ...)
# S3 method for bernoulliC
tidyBayesTest(A_data, B_data, priors, ...)
# S3 method for default
tidyBayesTest(A_data, ...)Vector of collected samples from recipe A
S3 method compatibility
Vector of collected samples from recipe B
Named vector or named list providing priors as required by the specified distribution:
For 'bernoulli' distribution list("alpha" = val1, "beta" = val2)
For 'normal' distribution c("mu" = val1, "lambda" = val2, "alpha" = val3, "beta" = val4)
For 'lognormal' distribution c("mu" = val1, "lambda" = val2, "alpha" = val3, "beta" = val4)
For 'poisson' distribution c("shape" = val1, "rate" = val2)
For 'exponential' distribution list("shape" = val1, "rate" = val2)
For 'uniform' distribution c("xm" = val1, "alpha" = val2)
For 'bernoulliC' distribution: same prior definitions as 'bernoulli'
For 'poissonC' distribution: same prior definitions as 'poisson'
See plotDistributions or the Note section of this help document for more info.
Number of posterior samples to draw. Should be large enough for the distribution to converge. 1e5 is a good rule of thumb. Not used for closed form tests.
A_binom <- rbinom(100, 1, .5)
B_binom <- rbinom(100, 1, .6)
getS3method("tidyBayesTest", "bernoulli")(A_binom, B_binom,
priors = c("alpha" = 1, "beta" = 1)
)
#> probability interval
#> 1: 0.19882 -0.3120340, 0.1265553
#> posteriorAdata
#> 1: 0.4196708,0.3969696,0.3807742,0.3963788,0.4024748,0.4100227,...
#> posteriorBdata
#> 1: 0.4321239,0.4648039,0.5391768,0.5413332,0.4419670,0.4671684,...
A_binom <- rbinom(100, 1, .5)
B_binom <- rbinom(100, 1, .6)
getS3method("tidyBayesTest", "bernoulliC")(A_binom, B_binom,
priors = c("alpha" = 1, "beta" = 1)
)
#> probability
#> 1: 0.1613447