mbnma.update {MBNMAdose}R Documentation

Update MBNMA to monitor deviance nodes in the model

Description

Useful for obtaining deviance contributions or fitted values. Same function used in MBNMAdose and MBNMAtime packages.

Usage

mbnma.update(
  mbnma,
  param = "theta",
  armdat = TRUE,
  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

armdat

Include raw arm-level data for each data point (agent, dose, study grouping)

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


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

# Fit a dose-response MBNMA, monitoring "psi" and "resdev"
result <- mbnma.run(network, fun=dloglin(), 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



[Package MBNMAdose version 0.4.3 Index]