mbnma.update: Update MBNMA to monitor deviance nodes in the model

Description Usage Arguments Value Examples

View source: R/run.functions.R

Description

Useful for obtaining deviance contributions or fitted values

Usage

1
2
3
4
5
6
mbnma.update(
  mbnma,
  param = "theta",
  n.iter = mbnma$BUGSoutput$n.iter,
  n.thin = mbnma$BUGSoutput$n.thin
)

Arguments

mbnma

An S3 object of class "mbnma" generated by running a dose-response MBNMA model

param

Used to indicate which node to monitor in the model. Can be any parameter in the model code that varies by all arms within all studies. These are some typical parameters that it might be of interest to monitor, provided they are in the original model code:

  • "theta" for fitted values

  • "psi" for fitted values on natural scale (e.g. probabilities)

  • "dev" for deviance contributions

  • "resdev" for residual deviance contributions

  • "delta" for within-study relative effects versus the study reference treatment

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.

Value

A data frame containing the posterior mean of the updates by arm and study, with arm and study identifiers.

For MBNMAdose:

For MBNMAtime:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# Using the triptans data
network <- mbnma.network(HF2PPITT)

# Fit a dose-response MBNMA, monitoring "psi" and "resdev"
result <- mbnma.run(network, fun="exponential", beta.1="rel", method="random",
  parameters.to.save=c("psi", "resdev"))

mbnma.update(result, param="theta") # monitor theta

mbnma.update(result, param="rhat") # monitor rhat

mbnma.update(result, param="delta") # monitor delta

MBNMAdose documentation built on Sept. 13, 2020, 5:08 p.m.