predict.aov_b: Predict method for aov_b model fits

View source: R/predict.aov_b.R

predict.aov_bR Documentation

Predict method for aov_b model fits

Description

Predict method for aov_b model fits

Usage

## S3 method for class 'aov_b'
predict(object, CI_level = 0.95, PI_level = 0.95, ...)

Arguments

object

Object of class aov_b

CI_level

Posterior probability covered by credible interval

PI_level

Posterior probability covered by prediction interval

...

optional arguments.

Value

tibble with estimate (posterior mean), prediction intervals, and credible intervals for the mean.

Examples


set.seed(2025)
N = 500
test_data = 
  data.frame(x1 = rep(letters[1:5],N/5))
test_data$outcome = 
  rnorm(N,-1 + 2 * (test_data$x1 %in% c("d","e")) )

# Fit 1-way ANOVA model
fit1 <-
  aov_b(outcome ~ x1,
        test_data,
        prior_mean_mu = 2,
        prior_mean_nu = 0.5,
        prior_var_shape = 0.01,
        prior_var_rate = 0.01)
predict(fit1)





bayesics documentation built on March 11, 2026, 5:07 p.m.