| IC | R Documentation |
Compute AIC, BIC, DIC, or WAIC for aov_b or lm_b objects. (Lower is better.)
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, ...)
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 |
Numeric (or in the case of DIC, a numeric vector)
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.