predict.mbnma {MBNMAtime} | R Documentation |
Predict effects over time in a given population based on MBNMA time-course models
Description
Used to predict effects over time for different treatments or to predict the results of a new study. For MBNMA models that include consistency relative effects on time-course parameters, this is calculated by combining relative treatment effects with a given reference treatment response (specific to the population of interest).
Usage
## S3 method for class 'mbnma'
predict(
object,
times = seq(0, max(object$model.arg$jagsdata$time, na.rm = TRUE), length.out = 30),
E0 = 0,
treats = NULL,
level = "treatment",
ref.resp = NULL,
synth = "common",
lim = "cred",
...
)
Arguments
object |
An S3 object of |
times |
A sequence of positive numbers indicating which time points to
predict mean responses for (or at which to conduct a node-split if used with |
E0 |
An object to indicate the value(s) to use for the response at time = 0 in the prediction. This can take a number of different formats depending on how it will be used/calculated. The default is 0 but this may lead to non-sensical predictions if Ratio of Means are modeled.
|
treats |
A character vector of treatment/class names or a numeric vector of treatment/class codes (as coded
in |
level |
Can take either |
ref.resp |
An object to indicate the value(s) to use for the reference treatment response in MBNMA models
in which the reference treatment response is not estimated within the model (i.e. those that model any time-
course parameters using
|
synth |
A character object that can take the value |
lim |
Specifies calculation of either 95% credible intervals ( |
... |
Arguments to be sent to R2jags for synthesis of the network
reference treatment effect (using |
Details
By default the network reference treatment baseline (E0
) and time-course
parameter values are set to zero so that predict()
estimates mean differences
(/relative treatment effects) over time versus the network reference treatment.
ref.resp
only needs to be specified if mbnma
has
been estimated using consistency relative effects (pool="rel"
) for
any time-course parameters, as these inform the absolute values of the
network reference treatment parameters which can then be added to the
relative effects to calculate specific predictions.
Value
An S3 object of class mb.predict
that contains the following
elements:
-
summary
A named list of data frames. Each data frame contains a summary of predicted responses at follow-up times specified intimes
for each treatment specified intreats
-
pred.mat
A named list of matrices. Each matrix contains the MCMC results of predicted responses at follow-up times specified intimes
for each treatment specified intreats
Examples
# Create an mb.network object from a dataset
network <- mb.network(osteopain)
# Run an MBNMA model with an Emax time-course
emax <- mb.run(network,
fun=temax(pool.emax="rel", method.emax="common",
pool.et50="abs", method.et50="common"))
# Predict responses using a stochastic baseline (E0) and a distribution for the
#network reference treatment
preds <- predict(emax, times=c(0:10),
E0=~rnorm(n, 7, 0.5),
ref.resp=list(emax=~rnorm(n, -0.5, 0.05)))
summary(preds)
# Predict responses using the original dataset to estimate the network reference
#treatment response
paindata.ref <- osteopain[osteopain$treatname=="Placebo_0",]
preds <- predict(emax, times=c(5:15),
E0=10,
ref.resp=paindata.ref)
summary(preds)
# Repeat the above prediction but using a random effects meta-analysis of the
#network reference treatment response
preds <- predict(emax, times=c(5:15),
E0=10,
ref.resp=paindata.ref,
synth="random")
summary(preds)