devdev: Dev-dev plot for comparing deviance contributions from two...

devdevR Documentation

Dev-dev plot for comparing deviance contributions from two models

Description

Plots the deviances of two model types for comparison. Often used to assess consistency by comparing consistency (NMA or MBNMA) and unrelated mean effects (UME) models (see \insertCitepedder2021cons;textualMBNMAdose). Models must be run on the same set of data or the deviance comparisons will not be valid.

Usage

devdev(mod1, mod2, dev.type = "resdev", n.iter = 2000, n.thin = 1, ...)

Arguments

mod1

First model for which to plot deviance contributions

mod2

Second model for which to plot deviance contributions

dev.type

STILL IN DEVELOPMENT FOR MBNMAdose! Deviances to plot - can be either residual deviances ("resdev", the default) or deviances ("dev")

n.iter

number of total iterations per chain (including burn in; default: 2000)

n.thin

thinning rate. Must be a positive integer. Set n.thin > 1 to save memory and computation time if n.iter is large. Default is max(1, floor(n.chains * (n.iter-n.burnin) / 1000)) which will only thin if there are at least 2000 simulations.

...

Arguments to be sent to ggplot2::geom_point() or ggplot2::geom_boxplot

Examples


# Using the triptans data
network <- mbnma.network(triptans)

# Run an poorly fitting linear dose-response
lin <- mbnma.run(network, fun=dpoly(degree=1))

# Run a better fitting Emax dose-response
emax <- mbnma.run(network, fun=demax())

# Run a standard NMA with unrelated mean effects (UME)
ume <- nma.run(network, UME=TRUE)

# Compare residual deviance contributions from linear and Emax
devdev(lin, emax) # Suggests model fit is very different

# Compare deviance contributions from Emax and UME
devdev(emax, ume) # Suggests model fit is similar




MBNMAdose documentation built on Aug. 8, 2023, 5:11 p.m.