View source: R/run.functions.R
mbnma.update | R Documentation |
Useful for obtaining deviance contributions or fitted values. Same function used in MBNMAdose and MBNMAtime packages.
mbnma.update(
mbnma,
param = "theta",
armdat = TRUE,
n.iter = mbnma$BUGSoutput$n.iter,
n.thin = mbnma$BUGSoutput$n.thin
)
mbnma |
An S3 object of class |
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:
|
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
|
A data frame containing the posterior mean of the updates by arm and study, with arm and study identifiers.
For MBNMAdose:
facet
indicates the agent identifier in the given arm of a study
fupdose
indicates the dose in the given arm of a study
For MBNMAtime:
facet
indicates the treatment identifier in the given arm of the study
fupdose
indicates the follow-up time at the given observation in the given
arm of the study
# 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.