IC: Compute AIC, BIC, DIC, or WAIC for aov_b or lm_b objects....

ICR Documentation

Compute AIC, BIC, DIC, or WAIC for aov_b or lm_b objects. (Lower is better.)

Description

Compute AIC, BIC, DIC, or WAIC for aov_b or lm_b objects. (Lower is better.)

Usage

DIC(object, ...)

## S3 method for class 'lm_b'
BIC(object, ...)

## S3 method for class 'glm_b'
BIC(object, ...)

## S3 method for class 'aov_b'
BIC(object, ...)

## S3 method for class 'lm_b'
AIC(object, ...)

## S3 method for class 'glm_b'
AIC(object, ...)

## S3 method for class 'aov_b'
AIC(object, ...)

## S3 method for class 'lm_b'
DIC(object, seed = 1, mc_error = 0.01, ...)

## S3 method for class 'glm_b'
DIC(object, seed = 1, ...)

## S3 method for class 'aov_b'
DIC(object, ...)

## S3 method for class 'lm_b'
WAIC(object, seed = 1, ...)

## S3 method for class 'aov_b'
WAIC(object, ...)

## S3 method for class 'glm_b'
WAIC(object, seed = 1, ...)

Arguments

object

aov_b, lm_b, or glm_b object

...

Passed to methods.

seed

integer. Always set your seed!!!

mc_error

The number of posterior draws will ensure that with 99% probability the posterior mean of the deviance for DIC will be within \pmmc_errorE(deviance).

Value

Numeric (or in the case of DIC, a numeric vector)

Examples


set.seed(2025)
N = 500
test_data <-
  data.frame(x1 = rnorm(N),
             x2 = rnorm(N),
             x3 = letters[1:5])
test_data$outcome <-
  rnorm(N,-1 + test_data$x1 + 2 * (test_data$x3 %in% c("d","e")) )
fit1 <-
  lm_b(outcome ~ x1 + x2 + x3,
       data = test_data)
AIC(fit1)
BIC(fit1)
DIC(fit1)
WAIC(fit1)




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

Related to IC in bayesics...