Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

deltaIC

Summarise DIC and WAIC from lgcp objects.


Description

Calculates DIC and WAIC differences and produces an ordered summary.

Usage

deltaIC(..., criterion = "DIC")

Arguments

...

Comma-separated objects inheriting from class inla and obtained from a run of INLA::inla(), bru() or lgcp()

criterion

If 'DIC', plots DIC differences; If 'WAIC', plots WAIC differences.

Value

A data frame with each row containing the model name, DIC, WAIC, deltaDIC, and deltaWAIC.

Examples

# Generate some data
input.df <- data.frame(x = cos(1:10))
input.df <- within(
  input.df,
  y <- ceiling(5 + 2 * cos(1:10) + rnorm(10, mean = 0, sd = 0.1))
)

# Fit two models
fit <- bru(y ~ x, family = "gaussian", data = input.df)
fit2 <- bru(y ~ x, family = "Poisson", data = input.df)

# Compare DIC

deltaIC(fit, fit2)

inlabru

Bayesian Latent Gaussian Modelling using INLA and Extensions

v2.3.1
GPL (>= 2)
Authors
Finn Lindgren [aut, cre, cph] (<https://orcid.org/0000-0002-5833-2011>, Finn Lindgren continued development of the main code), Fabian E. Bachl [aut, cph] (Fabian Bachl wrote the main code), David L. Borchers [ctb, dtc, cph] (David Borchers wrote code for Gorilla data import and sampling, multiplot tool), Daniel Simpson [ctb, cph] (Daniel Simpson wrote the basic LGCP sampling method), Lindesay Scott-Howard [ctb, dtc, cph] (Lindesay Scott-Howard provided MRSea data import code), Seaton Andy [ctb] (Andy Seaton provided testing and bugfixes)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.