mtc.hy.prior: Set priors for the heterogeneity parameter

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/mtc.hy.prior.R

Description

These functions generate priors for the heterogeneity parameter in mtc.model. Priors can be set explicitly or, for outcomes on the log odds-ratio scale, based on empirical research.

Usage

1
2
3
mtc.hy.prior(type, distr, ...)

mtc.hy.empirical.lor(outcome.type, comparison.type)

Arguments

type

Type of heterogeneity prior: 'std.dev', 'var', or 'prec' for standard deviation, variance, or precision respectively.

distr

Prior distribution name (JAGS syntax). Typical ones would be 'dunif' (uniform), 'dgamma' (Gamma), or 'dlnorm' (log-normal). Use 'dhnorm' for the half-normal. Note that, as in JAGS, the precision (and not the variance or standard deviation) is used for the normal distribution and its derivatives.

...

Arguments to the distr. Can be numerical values or "om.scale" for the estimated outcome measure scale (see mtc.model)

outcome.type

The type of outcome to get an empirical prior for. Can be one of 'mortality' (all-cause mortality), 'semi-objective' (e.g. cause-specific mortality, major morbidity event, drop-outs), or 'subjective' (e.g. pain, mental health, dichotomous biomarkers).

comparison.type

The type of comparison to get an empirical prior for. Can be one of 'pharma-control' (pharmacological interventions versus control), 'pharma-pharma' (pharmacological versus pharmacological interventions) and 'non-pharma' (any other comparisons).

Details

The generated prior is a list, the structure of which may change without notice. It can be converted to JAGS compatible code using as.character.

Empirical priors for the log odds-ratio (LOR) are taken from [Turner et al. 2012].

Value

A value to be passed to mtc.model.

Author(s)

Gert van Valkenhoef

See Also

mtc.model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# NOTE: the mtc.run commands below are for illustrative purposes, such a small
# number of iterations should obviously not be used in practice.

# set a uniform prior standard deviation
model1 <- mtc.model(smoking, hy.prior=mtc.hy.prior("std.dev", "dunif", 0, 2))
result <- mtc.run(model1, n.adapt=10, n.iter=10)

# set an empirical (log-normal) prior on the variance
model2 <- mtc.model(smoking, hy.prior=mtc.hy.empirical.lor("subjective", "non-pharma"))
result <- mtc.run(model2, n.adapt=10, n.iter=10)

# set a gamma prior on the precision
model3 <- mtc.model(smoking, hy.prior=mtc.hy.prior("prec", "dgamma", 0.01, 0.01))
result <- mtc.run(model3, n.adapt=10, n.iter=10)

Example output

Loading required package: coda
Compiling model graph
   Resolving undeclared variables
   Allocating nodes
Graph information:
   Observed stochastic nodes: 50
   Unobserved stochastic nodes: 54
   Total graph size: 1706

Initializing model

NOTE: Stopping adaptation


Warning message:
In rjags::jags.model(file.model, data = syntax[["data"]], inits = syntax[["inits"]],  :
  Adaptation incomplete
Compiling model graph
   Resolving undeclared variables
   Allocating nodes
Graph information:
   Observed stochastic nodes: 50
   Unobserved stochastic nodes: 54
   Total graph size: 1708

Initializing model

NOTE: Stopping adaptation


Warning message:
In rjags::jags.model(file.model, data = syntax[["data"]], inits = syntax[["inits"]],  :
  Adaptation incomplete
Compiling model graph
   Resolving undeclared variables
   Allocating nodes
Graph information:
   Observed stochastic nodes: 50
   Unobserved stochastic nodes: 54
   Total graph size: 1603

Initializing model

NOTE: Stopping adaptation


Warning message:
In rjags::jags.model(file.model, data = syntax[["data"]], inits = syntax[["inits"]],  :
  Adaptation incomplete

gemtc documentation built on May 15, 2021, 1:07 a.m.