data("peas")
# Prior specification 
# We assign a uniform Dirichlet distribution, that is, we set all 
# concentration parameters to 1
a <- c(1, 1, 1, 1)     
x <- peas$counts
factor_levels <- levels(peas$peas)
# Test the following mixed Hypothesis:
# Hr: roundYellow > wrinkledYellow = roundGreen > wrinkledGreen 
#
# Be careful: Factor levels are usually ordered alphabetically!
# When specifying hypotheses using indexes, make sure they refer to the 
# correct factor levels.
Hr <- c('1 > 2 = 3 > 4') 
# To avoid mistakes, write out factor levels explicitly:
Hr <- c('roundYellow > wrinkledYellow = roundGreen > wrinkledGreen')
out <- mult_bf_informed(x=x, Hr=Hr, a=a, factor_levels=factor_levels, niter=2e3,
bf_type = 'BFre')
summary(out)
Run the code above in your browser using DataLab