fit_i <- brm(rating ~ treat + period + carry + (1+treat|subject),
data = inhaler, family = "gaussian")
hypothesis(fit_i, "treat = period + carry")
hypothesis(fit_i, "exp(treat) - 3 = 0")
## perform one-sided hypothesis testing
hypothesis(fit_i, "period + carry - 3 < 0")
# compare random effects standard deviations
hypothesis(fit_i, "treat < Intercept", class = "sd_subject")
## test more than one hypothesis at once
hypothesis(fit_i, c("treat = period + carry", "exp(treat) - 3 = 0"))
Run the code above in your browser using DataLab