# NOT RUN {
data(colorad)
library(rstan)
# Build the model
model_bin <- BANOVA.model('Binomial')
stanmodel_bin <- BANOVA.build(model_bin)
out0 = BANOVA.run(y ~ typic, ~ color*blurfac, fit = stanmodel_bin,
data = colorad, id = 'id', num_trials = as.integer(16),
iter = 100, thin = 2, chains = 1)
summary(out0)
# planned comparison
out0_contra = BANOVA.run(y ~ typic, ~ color*blurfac, fit = stanmodel_bin,
data = colorad, id = 'id', num_trials = as.integer(16),
iter = 100, thin = 2, chains = 1,
contrast = list(typic = c(-1,1)))
summary(out0_contra)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab