DIC: Deviance Information Criterion

Description Usage Arguments Author(s) See Also Examples

Description

Generic function returning the deviance information criteriom of a fitted model object.

Usage

1
2
3
4
DIC(object, ...)

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

Arguments

object

an object of class "bayesx".

...

specify for which model the criterion should be returned, e.g. type model = 1 to obtain the value for the first model. Only meaningful if object contains of more than one model.

Author(s)

Nikolaus Umlauf, Thomas Kneib, Stefan Lang, Achim Zeileis.

See Also

bayesx.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Not run: 
## generate some data
set.seed(121)
n <- 200

## regressors
dat <- data.frame(x = runif(n, -3, 3))

## generate response 
dat$y <- with(dat, 1.5 + sin(x) + rnorm(n, sd = 0.6))

## estimate model
b <- bayesx(y ~ sx(x), data = dat, method = "MCMC")

## extract DIC
DIC(b)

## End(Not run)

datacamp/R2BayesX documentation built on May 14, 2019, 7:10 p.m.