# NOT RUN {
# condstudy_sub is a subset of condstudy with 180 obs. and the same variables
data(condstudy_sub)
model <- BANOVA.model('Normal')
stanmodel <- BANOVA.build(model)
out2 <- BANOVA.run(att~cond+pict, ~type, fit = stanmodel, data = condstudy_sub,
id = 'id', iter = 500, thin = 1, chains = 2)
conv.diag(out2)
summary(out2)
table.predictions(out2)
BANOVA.floodlight(out2, var_factor = 'type', var_numeric = 'pict')
cat(out2$model_code)
out3 <- BANOVA.run(pict~cond, ~type, fit = stanmodel, data = condstudy_sub,
id = 'id', iter = 500, thin = 1, chains = 2)
conv.diag(out3)
summary(out3)
BANOVA.mediation(out2, out3, xvar='cond', mediator='pict')
# }
Run the code above in your browser using DataLab