mbnma.emax.Rd
FUNCTION IS NOW DEPRECATED - USE mbnma.run()
DIRECTLY WITH OBJECTS OF class("dosefun")
mbnma.emax(
network,
emax = "rel",
ed50 = "rel",
method = "common",
class.effect = list(),
UME = FALSE,
cor = TRUE,
omega = NULL,
parameters.to.save = NULL,
pd = "pd.kl",
likelihood = NULL,
link = NULL,
priors = NULL,
arg.params = NULL,
...
)
An object of class mbnma.network
.
Refers to the Emax parameter of the Emax dose-response function.
Can take either "rel"
, "common"
, "random"
, or be assigned a numeric value (see details in ?mbnma.run
).
Refers to the ED50 parameter of the Emax dose-response function.
Can take either "rel"
, "common"
, "random"
, or be assigned a numeric value (see details in ?mbnma.run
).
Can take either "common"
or "random"
to indicate whether relative effects
should be modelled with between-study heterogeneity or not (see details).
A list of named strings that determines which dose-response
parameters to model with a class effect and what that effect should be
("common"
or "random"
). Element names should match dose-response parameter names.
Note that assuming class effects on some dose-response parameters may be unreasonable if
the range of doses differ substantially across agents within a class.
A boolean object to indicate whether to fit an Unrelated Mean Effects model that does not assume consistency and so can be used to test if the consistency assumption is valid.
A boolean object that indicates whether correlation should be modelled
between relative effect dose-response parameters. This is
automatically set to FALSE
if class effects are modelled or if multiple dose-response
functions are fitted.
A scale matrix for the inverse-Wishart prior for the covariance matrix used
to model the correlation between dose-response parameters (see Details for dose-response functions). omega
must
be a symmetric positive definite matrix with dimensions equal to the number of dose-response parameters modelled using
relative effects ("rel"
). If left as NULL
(the default) a diagonal matrix with elements equal to 100
is used.
A character vector containing names of parameters to monitor in JAGS
Can take either:
pv
only pV will be reported (as automatically outputted by R2jags
).
plugin
calculates pD by the plug-in
method (Spiegelhalter et al. 2002)
. It is faster, but may output negative
non-sensical values, due to skewed deviances that can arise with non-linear models.
pd.kl
calculates pD by the Kullback-Leibler divergence (Plummer 2008)
. This
will require running the model for additional iterations but is a more robust calculation for the effective
number of parameters in non-linear models.
popt
calculates pD using an optimism adjustment which allows for calculation
of the penalized expected deviance (Plummer 2008)
.
A string indicating the likelihood to use in the model. Can take either "binomial"
,
"normal"
or "poisson"
. If left as NULL
the likelihood will be inferred from the data.
A string indicating the link function to use in the model. Can take any link function
defined within JAGS (e.g. "logit"
, "log"
, "probit"
, "cloglog"
), be assigned the value "identity"
for
an identity link function, or be assigned the value "smd"
for modelling Standardised Mean Differences using an
identity link function. If left as NULL
the link function will be automatically assigned based
on the likelihood.
A named list of parameter values (without indices) and replacement prior distribution values given as strings using distributions as specified in JAGS syntax (see Plummer (2017) ).
Deprecated from version 0.4.0 onwards. Assign run and wrapper parameters
Arguments to be sent to R2jags.
An object of S3 class(c("mbnma", "rjags"))
containing parameter
results from the model. Can be summarized by print()
and can check
traceplots using R2jags::traceplot()
or various functions from the package mcmcplots
.
Nodes that are automatically monitored (if present in the model) have the following interpretation:
Parameters(s)/Parameter Prefix | Interpretation |
<named dose-response parameter> (e.g. emax ) | The pooled effect for each dose-response parameter, as defined in dose-response functions. Will vary by agent if pooling is specified as "rel" in the dose-response function. |
sd | The between-study SD (heterogeneity) for relative effects, reported if method="random" |
sd.<named dose-response parameter> (e.g. sd.emax ) | Between-study SD (heterogeneity) for absolute dose-response parameters specified as "random" . |
<named capitalized dose-response parameter> (e.g. EMAX ) | The class effect within each class for a given dose-response parameter. These will be estimated by the model if specified in class.effects for a given dose-response parameter. |
sd.<named capitalized dose-response parameter> (e.g. sd.EMAX ) | The within-class SD for different agents within the same class. Will be estimated by the model if any dose-response parameter in class.effect is set to "random" . |
totresdev | The residual deviance of the model |
deviance | The deviance of the model |
If there are errors in the JAGS model code then the object will be a list
consisting of two elements - an error message from JAGS that can help with
debugging and model.arg
, a list of arguments provided to mbnma.run()
which includes jagscode
, the JAGS code for the model that can help
users identify the source of the error.
Fits a Bayesian model-based network meta-analysis (MBNMA) with a defined
dose-response function. Follows the methods
of Mawdsley et al. (2016)
. This function acts as a wrapper for mbnma.run()
that
uses more clearly defined parameter names.
Argument | Model specification |
"rel" | Implies that relative effects should be pooled for this dose-response parameter separately for each agent in the network. |
"common" | Implies that all agents share the same common effect for this dose-response parameter. |
"random" | Implies that all agents share a similar (exchangeable) effect for this dose-response parameter. This approach allows for modelling of variability between agents. |
numeric() | Assigned a numeric value, indicating that this dose-response parameter should not be estimated from the data but should be assigned the numeric value determined by the user. This can be useful for fixing specific dose-response parameters (e.g. Hill parameters in Emax functions) to a single value. |
Mawdsley D, Bennetts M, Dias S, Boucher M, Welton NJ (2016).
“Model-Based Network Meta-Analysis: A Framework for Evidence Synthesis of Clinical Trial Data.”
CPT Pharmacometrics Syst Pharmacol, 5(8), 393-401.
ISSN 2163-8306 (Electronic) 2163-8306 (Linking), doi:10.1002/psp4.12091
, https://pubmed.ncbi.nlm.nih.gov/27479782/.
Plummer M (2008).
“Penalized loss functions for Bayesian model comparison.”
Biostatistics, 9(3), 523-39.
ISSN 1468-4357 (Electronic) 1465-4644 (Linking), https://pubmed.ncbi.nlm.nih.gov/18209015/.
Plummer M (2017).
JAGS user manual.
https://people.stat.sc.edu/hansont/stat740/jags_user_manual.pdf.
Spiegelhalter DJ, Best NG, Carlin BP, van der Linde A (2002).
“Bayesian measures of model complexity and fit.”
J R Statistic Soc B, 64(4), 583-639.
# \donttest{
# Using the triptans data
tripnet <- mbnma.network(triptans)
#> Values for `agent` with dose = 0 have been recoded to `Placebo`
#> agent is being recoded to enforce sequential numbering and allow inclusion of `Placebo`
# Fit an Emax dose-response MBNMA with random treatment effects on Emax and ED50
emax <- mbnma.emax(tripnet, emax="rel", ed50="rel", method="random")
#> Warning: This syntax for specifying dose-response functions will be removed in future versions.
#> Please use mbnma.run() and specify functions as dosefun objects (e.g. dloglin())`
#> 'ed50' parameters are on exponential scale to ensure they take positive values on the natural scale
#> `likelihood` not given by user - set to `binomial` based on data provided
#> `link` not given by user - set to `logit` based on assigned value for `likelihood`
#> Compiling model graph
#> Resolving undeclared variables
#> Allocating nodes
#> Graph information:
#> Observed stochastic nodes: 182
#> Unobserved stochastic nodes: 191
#> Total graph size: 4135
#>
#> Initializing model
#>
# Fit an Emax dose-response MBNMA with common treatment effects on Emax and
#a single common parameter estimated for ED50
emax <- mbnma.emax(tripnet, emax="rel", ed50="common", method="common")
#> Warning: This syntax for specifying dose-response functions will be removed in future versions.
#> Please use mbnma.run() and specify functions as dosefun objects (e.g. dloglin())`
#> 'ed50' parameters are on exponential scale to ensure they take positive values on the natural scale
#> `likelihood` not given by user - set to `binomial` based on data provided
#> `link` not given by user - set to `logit` based on assigned value for `likelihood`
#> Compiling model graph
#> Resolving undeclared variables
#> Allocating nodes
#> Graph information:
#> Observed stochastic nodes: 182
#> Unobserved stochastic nodes: 78
#> Total graph size: 3665
#>
#> Initializing model
#>
# For further examples see ?mbnma.run
# }