# Simulate a sample
{
set.seed(1)
N <- 1000
d <- 2 * (rnorm(N) <= 0.7) - 1
x <- sample(0L:2L, N, replace = TRUE)
Xmat <- matrix(x, nrow = N, ncol = 1)
yvec <- runif(N) <= (0.5 + 0.3 * (x == 2L))
}
# Fit our ANOVA BNP model
fit <- anova_bnp_bernoulli(yvec, Xmat, iter = 10000L, warmup = 6000L)
# Show MCMC results for gamma
gamma_chain(fit)
# Show the factors combination associated to each group
group_codes(fit)
# Show the posterior distribution of gamma
gamma_post(fit)
# Perform our Dunnet-like test
joint_significance_probability(fit)
# Show the shift function
f_post(fit)
F_post(fit)
shift_plot(fit, group1 = 1, group2 = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.