# NOT RUN {
# model with 'treat' as predictor
fit1 <- brm(rating ~ treat + period + carry, data = inhaler)
summary(fit1)
# model without 'treat' as predictor
fit2 <- brm(rating ~ period + carry, data = inhaler)
summary(fit2)
# compute model-averaged predicted values
(df <- unique(inhaler[, c("treat", "period", "carry")]))
pp_average(fit1, fit2, newdata = df)
# compute model-averaged fitted values
pp_average(fit1, fit2, method = "fitted", newdata = df)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab