| Type: | Package |
| Title: | Dose-Response MBNMA Models |
| Version: | 0.5.0 |
| Language: | en-GB |
| Date: | 2025-02-06 |
| URL: | https://hugaped.github.io/MBNMAdose/ |
| Maintainer: | Hugo Pedder <hugopedder@gmail.com> |
| Description: | Fits Bayesian dose-response model-based network meta-analysis (MBNMA) that incorporate multiple doses within an agent by modelling different dose-response functions, as described by Mawdsley et al. (2016) <doi:10.1002/psp4.12091>. By modelling dose-response relationships this can connect networks of evidence that might otherwise be disconnected, and can improve precision on treatment estimates. Several common dose-response functions are provided; others may be added by the user. Various characteristics and assumptions can be flexibly added to the models, such as shared class effects. The consistency of direct and indirect evidence in the network can be assessed using unrelated mean effects models and/or by node-splitting at the treatment level. |
| License: | GPL-3 |
| Depends: | R (≥ 3.0.2) |
| Imports: | grDevices, stats, graphics, utils, scales, dplyr (≥ 0.7.4),R2jags (≥ 0.5-7), rjags (≥ 4-8), magrittr (≥ 1.5), checkmate(≥ 1.8.5), Rdpack (≥ 0.11-0), igraph (≥ 2.0.1.1), ggplot2(≥ 2.2.1), reshape2 (≥ 1.4.3) |
| Suggests: | overlapping (≥ 1.5.0), RColorBrewer (≥ 1.1-2), mcmcplots(≥ 0.4.3), coda (≥ 0.19-4), testthat (≥ 1.0.2), crayon (≥1.3.4), forestplot (≥ 1.10), ggdist (≥ 2.4.0), zoo (≥1.8-8), lspline (≥ 1.0-0), formatR (≥ 1.14), netmeta, knitr,rmarkdown |
| SystemRequirements: | JAGS (>= 4.3.0)(https://mcmc-jags.sourceforge.net/) |
| Encoding: | UTF-8 |
| LazyData: | true |
| VignetteBuilder: | knitr |
| RoxygenNote: | 7.2.3 |
| RdMacros: | Rdpack |
| NeedsCompilation: | no |
| Packaged: | 2025-02-06 19:58:33 UTC; hp17602 |
| Author: | Hugo Pedder |
| Repository: | CRAN |
| Date/Publication: | 2025-02-07 00:40:23 UTC |
MBNMAdose for dose-response Model-Based Network Meta-Analysis
Description
MBNMAdose provides a collection of useful commands that allow users to run dose-responseModel-Based Network Meta-Analyses (MBNMA).
Introduction
MBNMAdose allows meta-analysis of studies that compare multiple doses of different agents in a way that canaccount for the dose-response relationship.
Whilst making use of all the available evidence in a statistically robust and biologically plausible framework,this also can help connect networks at the agent level that may otherwise be disconnected at the dose/treatmentlevel, and help improve precision of estimates (Pedder et al. 2021). The modelling framework is based on synthesising relative effectswhich avoids the necessity to adjust for baseline predictors, thereby making fewer assumptions than in typicalModel-Based Meta-Analysis.
By modelling the dose-response, MBNMA avoids heterogeneity and inconsistency that can arise from "lumping" differentdoses together (a technique sometimes done in Network Meta-Analysis). All models and analyses are implementedin a Bayesian framework, following an extension of the standard NMA methodology presented byLu and Ades (2004) and are run in (). For full details ofdose-response MBNMA methodology see Mawdsley et al. (2016). Within this package werefer to atreatment as a specificdose or a specificagent.
Workflow
Functions withinMBNMAdose follow a clear pattern of use:
Load your data into the correct format using
mbnma.network()Analyse your data using
mbnma.run()with a wide range of dose-response functionsExamine model results using forest plots and treatment rankings
Check model fit and test for consistency using functions like
mbnma.nodesplit()Use your model to predict responses using
predict()
At each of these stages there are a number of informative plots that can be generated to help understandthe data and to make decisions regarding model fitting.
Author(s)
Maintainer: Hugo Pedderhugopedder@gmail.com (ORCID)
Other contributors:
Adil Karim [contributor]
References
(2017).https://mcmc-jags.sourceforge.io/.
Lu G, Ades AE (2004).“Combination of direct and indirect evidence in mixed treatment comparisons.”Stat Med,23(20), 3105-24.ISSN 0277-6715 (Print) 0277-6715 (Linking),doi:10.1002/sim.1875,https://pubmed.ncbi.nlm.nih.gov/15449338/.
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/.
Pedder H, Dias S, Bennetts M, Boucher M, Welton NJ (2021).“Joining the dots: Linking disconnected networks of evidence using dose-response Model-Based Network Meta-Analysis.”Medical Decision Making,41(2), 194-208.
See Also
Useful links:
Examples
# Generate an "mbnma.network" object that stores data in the correct formatnetwork <- mbnma.network(triptans)# Generate a network plot at the dose/treatment levelplot(network, level="treatment")# Generate a network plot at the agent levelplot(network, level="agent", remove.loops=TRUE)# Perform "split" NMA to examine dose-response relationshipnma <- nma.run(network)plot(nma)# Analyse data using mbnma.run() with an Emax dose-response function# and common treatment effectsresult <- mbnma.run(network, fun=demax(), method="common")# Generate forest plots for model resultsplot(result)# Rank results and plot rankogramsranks <- rank(result)plot(ranks, params="emax")# Predict responsespred <- predict(result, E0=0.2)# Plot predicted response with "split" NMA results displayedplot(pred, overlay.split=TRUE)Pipe operator
Description
Seemagrittr::%>% for details.
Usage
lhs %>% rhsArguments
lhs | A value or the magrittr placeholder. |
rhs | A function call using the magrittr semantics. |
Value
The result of callingrhs(lhs).
Adds placebo comparisons for dose-response relationship
Description
Function adds additional rows to a data.frame of comparisons in a network that accountfor the relationship between placebo and other agents via the dose-responserelationship.
Usage
DR.comparisons(data.ab, level = "treatment", doselink = NULL)Arguments
data.ab | A data frame stored in an |
level | A character that can take either |
doselink | If given an integer value it indicates that connections via the dose-responserelationship with placebo should be plotted. The integer represents the minimum number of dosesfrom which a dose-response function could be estimated and is equivalent to the number ofparameters in the desired dose-response function plus one. If left as |
Add arm indices and agent identifiers to a dataset
Description
Adds arm indices (arms,narms) to a dataset and adds numeric identifiers foragent and class (if included in the data).
Usage
add_index(data.ab, agents = NULL, treatments = NULL)Arguments
data.ab | A data frame of arm-level data in "long" format containing the columns:
|
agents | A character string of agent names used to force a particular agent ordering.Default is |
treatments | A character string of treatment names used to force a particular treatment ordering.Default is |
Value
A data frame similar todata.ab but with additional columns:
armArm identifiers coded for each studynarmThe total number of arms in each study
Ifagent orclass are non-numeric or non-sequential (i.e. with missing numeric codes),agents/classes in the returned data frame will be numbered and recoded to enforce sequentialnumbering (a warning will be shown stating this).
Studies of alogliptin for lowering blood glucose concentration in patients with type II diabetes
Description
A dataset from a systematic review of Randomised-Controlled Trials (RCTs) comparing different doses ofalogliptin with placebo (Langford et al. 2016). The systematic review was simply performed and was intended toprovide data to illustrate a statistical methodology rather than for clinical inference. Alogliptin isa treatment aimed at reducing blood glucose concentration in type II diabetes. The outcome is continuous,and aggregate data responses correspond to the mean change in HbA1c from baseline to follow-up in studiesof at least 12 weeks follow-up. The dataset includes 14 Randomised-Controlled Trials (RCTs), comparing 5different doses of alogliptin with placebo, leading to 6 different treatments (combination of dose and agent)within the network.
Usage
alog_pcfbFormat
A data frame in long format (one row per arm and study), with 46 rows and 6 variables:
studyIDStudy identifiersagentCharacter data indicating the agent to which participants were randomiseddoseNumeric data indicating the standardised dose receivedyNumeric data indicating the mean change from baseline in blood glucose concentration (mg/dL) in a study armseNumeric data indicating the standard error for the mean change from baseline in blood glucose concentration (mg/dL) in a study armnNumeric data indicating the number of participants randomised
Details
alog_pcfb is a data frame in long format (one row per arm and study), with the variablesstudyID,agent,dose,y,se, andN.
References
Langford O, Aronson JK, van Valkenhoef G, Stevens RJ (2016).“Methods for meta-analysis of pharmacodynamic dose-response data with application to multi-arm studies of alogliptin.”Stat Methods Med Res.ISSN 1477-0334 (Electronic) 0962-2802 (Linking),doi:10.1177/0962280216637093.
Calculates values for EDx from an Emax model, the dose at which x% of the maximal response (Emax)is reached
Description
Calculates values for EDx from an Emax model, the dose at which x% of the maximal response (Emax)is reached
Usage
calc.edx(mbnma, x = 50)Arguments
mbnma | An S3 object of class |
x | A numeric value between 0 and 100 for the dose at which x% of the maximal response (Emax)should be calculated |
Value
A data frame of posterior EDx summary values for each agent
Check if all nodes in the network are connected (identical to function inMBNMAtime)
Description
Check if all nodes in the network are connected (identical to function inMBNMAtime)
Usage
check.network(g, reference = 1)Arguments
g | An network plot of |
reference | A numeric value indicating which treatment code to use as the reference treatment fortesting that all other treatments connect to it |
Plot cumulative ranking curves from MBNMA models
Description
Plot cumulative ranking curves from MBNMA models
Usage
cumrank(x, params = NULL, sucra = TRUE, ...)Arguments
x | An object of class |
params | A character vector of named parameters in the model that vary by either agentor class (depending on the value assigned to |
sucra | A logical object to indicate whether Surface Under Cumulative Ranking Curve (SUCRA)values should be calculated and returned as a data frame. Areas calculatedusing trapezoid approach. |
... | Arguments to be sent to |
Value
Line plots showing the cumulative ranking probabilities for each agent/class anddose-response parameter inx. The object returned is a list which contains the plot(an object ofclass(c("gg", "ggplot")) and a data frame of SUCRA valuesifsucra = TRUE.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Estimate rankings from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")ranks <- rank(emax)# Plot cumulative rankings for both dose-response parameters simultaneously# Note that SUCRA values are also returnedcumrank(ranks)Sets default priors for JAGS model code
Description
This function creates JAGS code snippets for default MBNMA model priors.
Usage
default.priors( fun = dloglin(), UME = FALSE, regress.mat = NULL, regress.effect = "common", om = list(rel = 5, abs = 10))Arguments
fun | An object of |
UME | A boolean object to indicate whether to fit an Unrelated Mean Effects modelthat does not assume consistency and so can be used to test if the consistencyassumption is valid. |
regress.mat | A Nstudy x Ncovariate design matrix of meta-regression covariates |
regress.effect | Indicates whether effect modification should be assumed to be |
om | a list with two elements that report the maximum relative ( |
Value
A list, each element of which is a named JAGS snippetcorresponding to a prior in the MBNMA JAGS code.
Examples
default.priors(fun=demax())Emax dose-response function
Description
Emax dose-response function
Usage
demax(emax = "rel", ed50 = "rel", hill = NULL, p.expon = FALSE)Arguments
emax | Pooling for Emax parameter. Can take |
ed50 | Pooling for ED50 parameter. Can take |
hill | Pooling for Hill parameter. Can take |
p.expon | A logical object to indicate whether |
Details
Emax represents the maximum response.exp(ED50) represents the dose at which 50% of the maximum response is achieved.exp(Hill) is the Hill parameter, which allows for a sigmoidal function.
Without Hill parameter:
\frac{E_{max}\times{x}}{ET_{50}+x}
With Hill parameter:
\frac{E_{max}\times{x^{hill}}}{ET_{50}\times{hill}}+x^{hill}
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
# Model without a Hill parameterdemax(emax="rel", ed50="common")# Model including a Hill parameter and defaults for Emax and ED50 parametersdemax(hill="common")Dev-dev plot for comparing deviance contributions from two models
Description
Plots the deviances of two model types for comparison. Often used to assessconsistency by comparing consistency (NMA or MBNMA) and unrelated mean effects (UME)models (see Pedder et al. (2021)). Models must be runon thesame set of data or the deviance comparisons will not be valid.
Usage
devdev(mod1, mod2, dev.type = "resdev", n.iter = 2000, n.thin = 1, ...)Arguments
mod1 | First model for which to plot deviance contributions |
mod2 | Second model for which to plot deviance contributions |
dev.type | STILL IN DEVELOPMENT FOR MBNMAdose! Deviances to plot - can be either residualdeviances ( |
n.iter | number of total iterations per chain (including burn in;default: 2000) |
n.thin | thinning rate. Must be a positive integer. Set |
... | Arguments to be sent to |
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an poorly fitting linear dose-responselin <- mbnma.run(network, fun=dpoly(degree=1))# Run a better fitting Emax dose-responseemax <- mbnma.run(network, fun=demax())# Run a standard NMA with unrelated mean effects (UME)ume <- nma.run(network, UME=TRUE)# Compare residual deviance contributions from linear and Emaxdevdev(lin, emax) # Suggests model fit is very different# Compare deviance contributions from Emax and UMEdevdev(emax, ume) # Suggests model fit is similarPlot deviance contributions from an MBNMA model
Description
Plot deviance contributions from an MBNMA model
Usage
devplot( mbnma, plot.type = "box", facet = TRUE, dev.type = "resdev", n.iter = mbnma$BUGSoutput$n.iter/2, n.thin = mbnma$BUGSoutput$n.thin, ...)Arguments
mbnma | An S3 object of class |
plot.type | Deviances can be plotted either as scatter points ( |
facet | A boolean object that indicates whether or not to facet (by agent for |
dev.type | STILL IN DEVELOPMENT FOR MBNMAdose! Deviances to plot - can be either residualdeviances ( |
n.iter | number of total iterations per chain (including burn in;default: 2000) |
n.thin | thinning rate. Must be a positive integer. Set |
... | Arguments to be sent to |
Details
Deviances should only be plotted for models that have converged successfully. If deviancecontributions have not been monitored inmbnma$parameters.to.save then additionaliterations will have to be run to get results for these.
ForMBNMAtime, deviance contributions cannot be calculated for models with a multivariate likelihood (i.e.those that account for correlation between observations) because the covariance matrix in thesemodels is treated as unknown (ifrho = "estimate") and deviance contributions will be correlated.
Value
Generates a plot of deviance contributions and returns a list containing theplot (as an object ofclass(c("gg", "ggplot"))), and a data.frame of posterior meandeviance/residual deviance contributions for each observation.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMA and predict responsesemax <- mbnma.run(network, fun=demax(), method="random")# Plot deviancesdevplot(emax)# Plot deviances using boxplotsdevplot(emax, plot.type="box")# Plot deviances on a single scatter plot (not facetted by agent)devplot(emax, facet=FALSE, plot.type="scatter")# A data frame of deviance contributions can be obtained from the object#returned by `devplot`devs <- devplot(emax)head(devs$dev.data)# Other deviance contributions not currently implemented but in future#it will be possible to plot them like so#devplot(emax, dev.type="dev")Exponential dose-response function
Description
Similar parameterisation to the Emax model but with non-asymptotic maximal effect (Emax). Can fita 1-parameter (Emax only) or 2-parameter model (includes onset parameter that controls the curvature ofthe dose-response relationship)
Usage
dexp(emax = "rel", onset = NULL, p.expon = FALSE)Arguments
emax | Pooling for Emax parameter. Can take |
onset | Pooling for onset parameter. Can take |
p.expon | A logical object to indicate whether |
Details
1-parameter model:emax\times{(1-exp(-x))}
2-parameter model:emax\times{(1-exp(onset*-x))}
where emax is the maximum efficacy of an agent and rate is the speed
Dose-response parameter arguments:
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
Value
An object ofclass("dosefun")
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
# Single parameter exponential function is defaultdexp()# Two parameter exponential functiondexp(onset="rel")Fractional polynomial dose-response function
Description
Fractional polynomial dose-response function
Usage
dfpoly(degree = 1, beta.1 = "rel", beta.2 = "rel", power.1 = 0, power.2 = 0)Arguments
degree | The degree of the fractional polynomial as defined in Royston and Altman (1994) |
beta.1 | Pooling for the 1st fractional polynomial coefficient. Can take |
beta.2 | Pooling for the 2nd fractional polynomial coefficient. Can take |
power.1 | Value for the 1st fractional polynomial power ( |
power.2 | Value for the 2nd fractional polynomial power ( |
Details
\beta_1represents the 1st coefficient.\beta_2represents the 2nd coefficient.\gamma_1represents the 1st fractional polynomial power\gamma_2represents the 2nd fractional polynomial power
For a polynomial ofdegree=1:
{\beta_1}x^{\gamma_1}
For a polynomial ofdegree=2:
{\beta_1}x^{\gamma_1}+{\beta_2}x^{\gamma_2}
x^{\gamma} is a regular power except where\gamma=0, wherex^{(0)}=ln(x).If a fractional polynomial power\gamma repeats within the function it is multiplied by anotherln(x).
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
Royston P, Altman D (1994).“Regression Using Fractional Polynomials of Continuous Covariates: Parsimonious Parametric Modelling.”Journal of the Royal Statistical Society: Series C,43(3), 429-467.
Examples
# 1st order fractional polynomial a value of 0.5 for the powerdfpoly(beta.1="rel", power.1=0.5)# 2nd order fractional polynomial with relative effects for coefficients# and a value of -0.5 and 2 for the 1st and 2nd powers respectivelydfpoly(degree=2, beta.1="rel", beta.2="rel", power.1=-0.5, power.2=2)Integrated Two-Component Prediction (ITP) function
Description
Similar parameterisation to the Emax model but with non-asymptotic maximal effect (Emax). Proposedby proposed by Fu and Manner (2010)
Usage
ditp(emax = "rel", rate = "rel", p.expon = FALSE)Arguments
emax | Pooling for Emax parameter. Can take |
rate | Pooling for Rate parameter. Can take |
p.expon | A logical object to indicate whether |
Details
Emax represents the maximum response.Rate represents the rate at which a change in the dose of the drug leads toa change in the effect
{E_{max}}\times\frac{(1-exp(-{rate}\times{x}))}{(1-exp(-{rate}\times{max(x)}))}
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
Fu H, Manner D (2010).“Bayesian adaptive dose-finding studies with delayed responses.”J Biopharm Stat,20(5), 1055-1070.doi:10.1080/10543400903315740.
Examples
# Model a common effect on rateditp(emax="rel", rate="common")Log-linear (exponential) dose-response function
Description
Modelled assuming relative effects ("rel")
Usage
dloglin()Details
rate\times{log(x + 1)}
Dose-response parameter arguments:
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
Value
An object ofclass("dosefun")
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
dloglin()Agent-specific dose-response function
Description
Function combines different dose-response functions together to create an object containingparameters for multiple dose-response functions.
Usage
dmulti(funs = list())Arguments
funs | A list of objects of |
Value
An object ofclass("dosefun")
Examples
funs <- c(rep(list(demax()),3), rep(list(dloglin()),2), rep(list(demax(ed50="common")),3), rep(list(dexp()),2))dmulti(funs)Non-parameteric dose-response functions
Description
Used to fit monotonically increasing non-parametric dose-response relationship followingthe method of Owen et al. (2015))
Usage
dnonparam(direction = "increasing")Arguments
direction | Can take either |
Value
An object ofclass("dosefun")
References
Owen RK, Tincello DG, Keith RA (2015).“Network meta-analysis: development of a three-level hierarchical modeling approach incorporating dose-related constraints.”Value Health,18(1), 116-26.ISSN 1524-4733 (Electronic) 1098-3015 (Linking),doi:10.1016/j.jval.2014.10.006,https://pubmed.ncbi.nlm.nih.gov/25595242/.
Examples
# Monotonically increasing dose-responsednonparam(direction="increasing")# Monotonically decreasing dose-responsednonparam(direction="decreasing")Polynomial dose-response function
Description
Polynomial dose-response function
Usage
dpoly( degree = 1, beta.1 = "rel", beta.2 = "rel", beta.3 = "rel", beta.4 = "rel")Arguments
degree | The degree of the polynomial - e.g. |
beta.1 | Pooling for the 1st polynomial coefficient. Can take |
beta.2 | Pooling for the 2nd polynomial coefficient. Can take |
beta.3 | Pooling for the 3rd polynomial coefficient. Can take |
beta.4 | Pooling for the 4th polynomial coefficient. Can take |
Details
\beta_1represents the 1st coefficient.\beta_2represents the 2nd coefficient.\beta_3represents the 3rd coefficient.\beta_4represents the 4th coefficient.
Linear model:
\beta_1{x}
Quadratic model:
\beta_1{x} + \beta_2{x^2}
Cubic model:
\beta_1{x} + \beta_2{x^2} + \beta_3{x^3}
Quartic model:
\beta_1{x} + \beta_2{x^2} + \beta_3{x^3} + \beta_4{x^4}
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
# Linear model with random effectsdpoly(beta.1="rel")# Quadratic model dose-response function# with an exchangeable (random) absolute parameter estimated for the 2nd coefficientdpoly(beta.1="rel", beta.2="random")Drop treatments from multi-arm (>2) studies for node-splitting
Description
Drops arms in a way which preserves connectivity and equally removesdata from each treatment in a nodesplit comparison (so as to maximise precision)
Usage
drop.comp(ind.df, drops, comp, start = 1)Arguments
ind.df | A data frame in long format (one arm per row) from which to drop treatments |
drops | A vector of study identifiers from which to drop treatments |
comp | A numeric vector of length 2 that contains treatment codes corresponding to the comparisonfor node-splitting |
start | Can take either |
Drop studies that are not connected to the network reference treatment
Description
Drop studies that are not connected to the network reference treatment
Usage
drop.disconnected(network, connect.dose = FALSE)Arguments
network | An object of class |
connect.dose | A boolean object to indicate whether treatments should bekept in the network if they connect via the simplest possible dose-responserelationship ( |
Value
A list containing a single row per arm data frame containing only studies that areconnected to the network reference treatment, and a character vector of treatment labels
Examples
# Using the triptans headache datasetnetwork <- mbnma.network(triptans)drops <- drop.disconnected(network)# No studies have been dropped since network is fully connectedlength(unique(network$data.ab$studyID))==length(unique(drops$data.ab$studyID))# Make data with no placebonoplac.df <- network$data.ab[network$data.ab$narm>2 & network$data.ab$agent!=1,]net.noplac <- mbnma.network(noplac.df)# Studies are dropped as some only connect via the dose-response functiondrops <- drop.disconnected(net.noplac, connect.dose=FALSE)length(unique(net.noplac$data.ab$studyID))==length(unique(drops$data.ab$studyID))# Studies are not dropped if they connect via the dose-response functiondrops <- drop.disconnected(net.noplac, connect.dose=TRUE)length(unique(net.noplac$data.ab$studyID))==length(unique(drops$data.ab$studyID))Spline dose-response functions
Description
Used to fit B-splines, natural cubic splines, andpiecewise linear splines(Perperoglu et al. 2019).
Usage
dspline( type = "bs", knots = 1, degree = 1, beta.1 = "rel", beta.2 = "rel", beta.3 = "rel", beta.4 = "rel", beta.5 = "rel", beta.6 = "rel")Arguments
type | The type of spline. Can take |
knots | The number/location of spline internal knots. If a single number is given it indicates the number of knots (they willbe equally spaced across the range of dosesfor each agent). If a numeric vector is given it indicates the location of the knots. |
degree | The degree of the piecewise B-spline polynomial - e.g. |
beta.1 | Pooling for the 1st coefficient. Can take |
beta.2 | Pooling for the 2nd coefficient. Can take |
beta.3 | Pooling for the 3rd coefficient. Can take |
beta.4 | Pooling for the 4th coefficient. Can take |
beta.5 | Pooling for the 5th coefficient. Can take |
beta.6 | Pooling for the 6th coefficient. Can take |
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
Perperoglu A, Sauerbrei W, Abrahamowicz M, Schmid M (2019).“A review of spline function procedures in R.”BMC Medical Research Methodology,19(46), 1-16.doi:10.1186/s12874-019-0666-3.
Examples
# Second order B spline with 2 knots and random effects on the 2nd coefficientdspline(type="bs", knots=2, degree=2, beta.1="rel", beta.2="rel")# Piecewise linear spline with knots at 0.1 and 0.5 quantiles# Single parameter independent of treatment estimated for 1st coefficient#with random effectsdspline(type="ls", knots=c(0.1,0.5), beta.1="random", beta.2="rel")User-defined dose-response function
Description
User-defined dose-response function
Usage
duser(fun, beta.1 = "rel", beta.2 = "rel", beta.3 = "rel", beta.4 = "rel")Arguments
fun | A formula specifying any relationship including |
beta.1 | Pooling for the 1st coefficient. Can take |
beta.2 | Pooling for the 2nd coefficient. Can take |
beta.3 | Pooling for the 3rd coefficient. Can take |
beta.4 | Pooling for the 4th coefficient. Can take |
Value
An object ofclass("dosefun")
Dose-response parameters
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
When relative effects are modelled on more than one dose-response parameter,correlation between them is automatically estimated using a vague inverse-Wishart prior.This prior can be made slightly more informative by specifying the scale matrixomegaand by changing the degrees of freedom of the inverse-Wishart priorusing thepriors argument inmbnma.run().
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
dr <- ~ beta.1 * (1/(dose+1)) + beta.2 * dose^2duser(fun=dr, beta.1="common", beta.2="rel")Plot fitted values from MBNMA model
Description
Plot fitted values from MBNMA model
Usage
fitplot( mbnma, disp.obs = TRUE, n.iter = mbnma$BUGSoutput$n.iter, n.thin = mbnma$BUGSoutput$n.thin, ...)Arguments
mbnma | An S3 object of class |
disp.obs | A boolean object to indicate whether raw data responses should beplotted as points on the graph |
n.iter | number of total iterations per chain (including burn in;default: 2000) |
n.thin | thinning rate. Must be a positive integer. Set |
... | Arguments to be sent to |
Details
Fitted values should only be plotted for models that have converged successfully.If fitted values (theta) have not been monitored inmbnma$parameters.to.savethen additional iterations will have to be run to get results for these.
Value
Generates a plot of fitted values from the MBNMA model and returns a list containingthe plot (as an object ofclass(c("gg", "ggplot"))), and a data.frame of posterior meanfitted values for each observation.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMA and predict responsesemax <- mbnma.run(network, fun=demax(), method="random")# Plot fitted values and observed valuesfitplot(emax)# Plot fitted values onlyfitplot(emax, disp.obs=FALSE)# A data frame of fitted values can be obtained from the object#returned by `fitplot`fits <- fitplot(emax)head(fits$fv)Automatically generate parameters to save for a dose-response MBNMA model
Description
Automatically generate parameters to save for a dose-response MBNMA model
Usage
gen.parameters.to.save(fun, model, regress.mat = NULL)Arguments
fun | An object of |
model | A JAGS model written as a character object |
regress.mat | A Nstudy x Ncovariate design matrix of meta-regression covariates |
Generates spline basis matrices for fitting to dose-response function
Description
Generates spline basis matrices for fitting to dose-response function
Usage
genspline( x, spline = "bs", knots = 1, degree = 1, max.dose = max(x), boundaries = NULL)Arguments
x | A numeric vector indicating all time points available in the dataset |
spline | Indicates the type of spline function. Can be either a piecewise linear spline ( |
knots | The number/location of internal knots. If a single integer is given it indicates the number of knots (they willbe equally spaced across the range of dosesfor each agent). If a numeric vector is given it indicates the quantiles of the knots asa proportion of the maximum dose in the dataset. For example, if the maximum dose in the datasetis 100mg/d, |
degree | a positive integer giving the degree of the polynomial from which the spline function is composed(e.g. |
max.dose | A number indicating the maximum dose between which to calculate the spline function. |
boundaries | A positive numeric vector of length 2 that represents the doses at which to anchor the B-spline or naturalcubic spline basis matrix. This allows data to extend beyond the boundary knots, or for the basis parameters to not depend on |
Value
A spline basis matrix with number of rows equal tolength(x) and the number of columns equal to the numberof coefficients in the spline.
Examples
x <- 0:100genspline(x)# Generate a quadratic B-spline with 1 equally spaced internal knotgenspline(x, spline="bs", knots=2, degree=2)# Generate a natural cubic spline with 3 knots at selected quantilesgenspline(x, spline="ns", knots=c(0.1, 0.5, 0.7))# Generate a piecewise linear spline with 3 equally spaced knotsgenspline(x, spline="ls", knots=3)Get current priors from JAGS model code
Description
Identical toget.prior() inMBNMAtime package.This function takes JAGS model presented as a string and identifies whatprior values have been used for calculation.
Usage
get.prior(model)Arguments
model | A character object of JAGS MBNMA model code |
Details
Even if an MBNMA model that has not initialised successfully andresults have not been calculated, the JAGS model for it is saved inmbnma$model.arg$jagscode and therefore priors can still be obtained.This allows for priors to be changed even in failing models, which may helpsolve issues with compiling or updating.
Value
A character vector, each element of which is a line of JAGS codecorresponding to a prior in the JAGS code.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMAresult <- mbnma.run(network, fun=demax(), method="random")# Obtain model prior valuesprint(result$model.arg$priors)# Priors when using mbnma.run with an exponential functionresult <- mbnma.run(network, fun=dexp(), method="random")print(result$model.arg$priors)Calculates league table of effects between treatments in MBNMA and/or NMA models
Description
Calculates league table of effects between treatments in MBNMA and/or NMA models
Usage
get.relative( lower.diag, upper.diag = lower.diag, treatments = list(), lower.direction = "colvrow", upper.direction = "rowvcol", regress.vals = NULL, eform = FALSE, lim = "cred")Arguments
lower.diag | An S3 object either of class |
upper.diag | Same as for |
treatments | A list whose elements each represent different treatments.Treatment is defined as a combination of agent and dose. Only agents specified in |
lower.direction | Whether treatment effects should be presented as the column versus the row treatmentfor each cell in thelower-left diagonal of the league table ( |
upper.direction | Same as for |
regress.vals | A named numeric vector of effect modifier values at which relative effectsshould be estimated. Named elements must match variable names specified in regression design matrix( |
eform | Whether outputted results should be presented in their exponential form (e.g. formodels with log or logit link functions) |
lim | Specifies calculation of either 95% credible intervals ( |
Value
An array oflength(treatments) x length(treatments) x nsims, wherensimsis the number of iterations monitored inlower.diag. The array contains the individualMCMC values for each relative effect calculated between alltreatments on the link scalespecified in thelower.diag andupper.diag models.
Examples
# Using the osteoarthritis datanetwork <- mbnma.network(osteopain)# Run an MBNMA modelexpon <- mbnma.run(network, fun=dexp(), method="random")# Calculate relative effects for MBNMA between:# Celebrex 100mg/d, Celebrex 200mg/d, Tramadol 100mg/drel.eff <- get.relative(lower.diag=expon, treatments=list("Celebrex"=c(100,200), "Tramadol"=100))# Run an NMA modelnma <- nma.run(network, method="random")# Compare results between MBNMA and NMA modelsrel.eff <- get.relative(lower.diag=expon, upper.diag=nma, treatments=list("Celebrex"=c(100,200), "Tramadol"=100), upper.direction="colvrow")Prepares data for JAGS
Description
Converts MBNMA data frame to a list for use in JAGS model
Usage
getjagsdata( data.ab, class = FALSE, sdscale = FALSE, regress = NULL, regress.effect = "common", likelihood = check.likelink(data.ab)$likelihood, link = check.likelink(data.ab)$link, level = "agent", fun = NULL, nodesplit = NULL)Arguments
data.ab | A data frame of arm-level data in "long" format containing the columns:
|
class | A boolean object indicating whether or not |
sdscale | Logical object to indicate whether to write a model that specifies a reference SDfor standardising when modelling using Standardised Mean Differences. Specifying |
regress | A formula of effect modifiers (variables thatinteract with the treatment effect) to incorporate using Network Meta-Regression(E.g. |
regress.effect | Indicates whether effect modification should be assumed to be |
likelihood | A string indicating the likelihood to use in the model. Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
level | Can take either |
fun | An object of |
nodesplit | A numeric vector of length 2 containing treatment codes on which to performan MBNMA nodesplit (see |
Value
A named list of numbers, vector, matrices and arrays to be sent toJAGS. List elements are:
If
likelihood="normal":yAn array of mean responses for each arm within each studyseAn array of standard errors for each arm within each study
If
likelihood="binomial":rAn array of the number of responses/count for each each arm within each studynAn array of the number of participants for each arm within each study
If
likelihood="poisson":rAn array of the number of responses/count for each each arm within each studyEAn array of the total exposure time for each arm within each study
doseA matrix of doses for each arm within each study (iflevel="agent")narmA numeric vector with the number of arms per studyNSThe total number of studies in the datasetNagentThe total number of agents in the dataset (iflevel="agent")agentA matrix of agent codes within each study (iflevel="agent")NTThe total number of treatment in the dataset (iflevel="treatment")treatmentA matrix of treatment codes within each study (iflevel="treatment")NclassOptional. The total number of classes in the datasetclassOptional. A matrix of class codes within each studyclasskeyOptional. A vector of class codes that correspond to agent codes.Same length as the number of agent codes.split.indOptional. A matrix indicating whether a specific arm contributes evidenceto a nodesplit comparison.
Examples
# Using the triptans headache datasetnetwork <- mbnma.network(triptans)jagsdat <- getjagsdata(network$data.ab, likelihood="binomial", link="logit")# Get JAGS data with classnetclass <- mbnma.network(osteopain)jagsdat <- getjagsdata(netclass$data.ab, class=TRUE)# Get JAGS data at the treatment level for split Network Meta-Analysisnetwork <- mbnma.network(triptans)jagsdat <- getjagsdata(network$data.ab, level="treatment")Studies of treatments for Serum Uric Acid reduction in patients with gout
Description
A dataset from a systematic review of interventions for lowering Serum Uric Acid (SUA) concentration inpatients with gout(not published previously). The outcome is continuous, and aggregate data responsescorrespond to the mean change from baseline in SUA in mg/dL at 2 weeks follow-up. The dataset includes 10Randomised-Controlled Trials (RCTs), comparing 5 different agents, and placebo. Data for one agent (RDEA)arises from an RCT that is not placebo-controlled, and so is not connected to the network directly. In totalthere were 19 different treatments (combination of dose and agent).
Usage
goutFormat
A data frame in long format (one row per arm and study), with 27 rows and 5 variables:
studyIDStudy identifiersyNumeric data indicating the mean change from baseline in SUA in a study armseNumeric data indicating the standard error for the mean change from baseline in SUA in a study armagentCharacter data indicating the agent to which participants were randomiseddoseNumeric data indicating the standardised dose received
Source
Pfizer Ltd.
Identify comparisons in loops that fulfill criteria for node-splitting
Description
Identify comparisons informed by both direct and indirect evidence fromindependent sources, which therefore fulfill the criteria for testing forinconsistency via node-splitting.
Usage
inconsistency.loops(df, checkindirect = TRUE, incldr = FALSE)Arguments
df | A data frame containing variables |
checkindirect | A boolean object to indicate whether or not to perform an additionalcheck to ensure network remains connected even after dropping direct evidence on a comparison.Default is |
incldr | A boolean object indicating whether or not to allow for indirect evidence contributions viathe dose-response relationship. This can be used when node-splitting in dose-response MBNMA to allowfor a greater number of potential loops in which to check for consistency. |
Details
Similar togemtc::mtc.nodesplit.comparisons() but uses a fixedreference treatment and therefore identifies fewer loops in which to test forinconsistency. Heterogeneity can also be parameterised as inconsistency andso testing for inconsistency in additional loops whilst changing thereference treatment would also be identifying heterogeneity. Depends onigraph.
Value
A data frame of comparisons that are informed by direct and indirectevidence from independent sources. Each row of the data frame is adifferent treatment comparison. Numerical codes int1 andt2 correspondto treatment codes.path indicates the treatment codes that connect theshortest path of indirect evidence.
Ifincldr=TRUE thenpath may indicatedoseresp for some comparisons.These are comparisons for which indirect evidence is only available via thedose-response relationship. The two numbers given after (e.g.3 2) indicate thenumber of doses available in the indirect evidence with which to estimate thedose-response function for the treatments int1 andt2 respectively/
References
There are no references for Rd macro\insertAllCites on this help page.
Examples
# Identify comparisons informed by direct and indirect evidence#in triptans datasetnetwork <- mbnma.network(triptans)inconsistency.loops(network$data.ab)# Include indirect evidence via dose-response relationshipinconsistency.loops(network$data.ab, incldr=TRUE)# Do not perform additional connectivity check on datadata <- data.frame(studyID=c(1,1,2,2,3,3,4,4,5,5,5), treatment=c(1,2,1,3,2,3,3,4,1,2,4) )inconsistency.loops(data, checkindirect=FALSE)Identify unique comparisons within a network
Description
Identify unique contrasts within a network that make up all the head-to-head comparisons. Repetitionsof the same treatment comparison are grouped together.
Usage
mbnma.comparisons(df)Arguments
df | A data frame containing variables |
Value
A data frame of unique comparisons in which each row represents a different comparison.t1 andt2 indicate the treatment codes that make up the comparison.nr indicates the numberof times the given comparison is made within the network.
If there is only a single follow-up observation for each study within the dataset (i.e. as for standardnetwork meta-analysis)nr will represent the number of studies that compare treatmentst1 andt2.
If there are multiple observations for each study within the dataset (as in time-course MBNMA)nr will represent the number of time points in the dataset in which treatmentst1 andt2 arecompared.
Examples
df <- data.frame(studyID=c(1,1,2,2,3,3,4,4,5,5,5), treatment=c(1,2,1,3,2,3,3,4,1,2,4) )# Identify unique comparisons within the datambnma.comparisons(df)# Using the triptans headache datasetnetwork <- mbnma.network(triptans) # Adds treatment identifiersmbnma.comparisons(network$data.ab)Node-splitting model for testing consistency at the treatment level using MBNMA
Description
Splits contributions for a given set of treatment comparisons into direct andindirect evidence. A discrepancy between the two suggests that the consistencyassumption required for NMA and MBNMA may violated.
Usage
mbnma.nodesplit( network, fun = dpoly(degree = 1), method = "common", comparisons = NULL, incldr = TRUE, ...)## S3 method for class 'nodesplit'plot(x, plot.type = "forest", ...)Arguments
network | An object of class |
fun | An object of |
method | Can take either |
comparisons | A matrix specifying the comparisons to be split (one row per comparison).The matrix must have two columns indicating each treatment for each comparison. Values caneither be character (corresponding to the treatment names given in |
incldr | A boolean object indicating whether or not to allow for indirect evidence contributions viathe dose-response relationship. This can be used when node-splitting in dose-response MBNMA to allowfor a greater number of potential loops in which to check for consistency. |
... | Arguments to be sent to |
x | An object of |
plot.type | A character string that can take the value of |
Details
The S3 methodplot() on annodesplit object generates eitherforest plots of posterior medians and 95\% credible intervals, or density plotsof posterior densities for direct and indirect evidence.
Value
Plots the desired graph ifplot.type="forest" and plots and returns an objectofclass(c("gg", "ggplot")) ifplot.type="density".
Functions
plot(nodesplit): Plot outputs from treatment-level nodesplit MBNMA models
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)split <- mbnma.nodesplit(network, fun=demax(), likelihood = "binomial", link="logit", method="common")#### To perform nodesplit on selected comparisons ##### Check for closed loops of treatments with independent evidence sources# Including indirect evidence via the dose-response relationshiploops <- inconsistency.loops(network$data.ab, incldr=TRUE)# This...single.split <- mbnma.nodesplit(network, fun=dexp(), likelihood = "binomial", link="logit", method="random", comparisons=rbind(c("sumatriptan_1", "almotriptan_1")))#...is the same as...single.split <- mbnma.nodesplit(network, fun=dexp(), likelihood = "binomial", link="logit", method="random", comparisons=rbind(c(6, 12)))# Plot resultsplot(split, plot.type="density") # Plot density plots of posterior densitiesplot(split, txt_gp=forestplot::fpTxtGp(cex=0.5)) # Plot forest plots (with smaller label size)# Print and summarise resultsprint(split)summary(split) # Generate a data frame of summary resultsRun MBNMA dose-response models
Description
Fits a Bayesian dose-response for model-based network meta-analysis(MBNMA) that can account for multiple doses of different agents byapplying a desired dose-response function. Follows the methodsof Mawdsley et al. (2016).
Usage
mbnma.run( network, fun = dpoly(degree = 1), method = "common", regress = NULL, regress.effect = "common", class.effect = list(), UME = FALSE, sdscale = FALSE, cor = FALSE, omega = NULL, parameters.to.save = NULL, pD = TRUE, likelihood = NULL, link = NULL, priors = NULL, n.iter = 20000, n.chains = 3, n.burnin = floor(n.iter/2), n.thin = max(1, floor((n.iter - n.burnin)/1000)), autojags = FALSE, Rhat = 1.05, n.update = 10, model.file = NULL, jagsdata = NULL, ...)Arguments
network | An object of class |
fun | An object of |
method | Can take either |
regress | A formula of effect modifiers (variables thatinteract with the treatment effect) to incorporate using Network Meta-Regression(E.g. |
regress.effect | Indicates whether effect modification should be assumed to be |
class.effect | A list of named strings that determines which dose-responseparameters to model with a class effect and what that effect should be( |
UME | A boolean object to indicate whether to fit an Unrelated Mean Effects modelthat does not assume consistency and so can be used to test if the consistencyassumption is valid. |
sdscale | Logical object to indicate whether to write a model that specifies a reference SDfor standardising when modelling using Standardised Mean Differences. Specifying |
cor | A boolean object that indicates whether correlation should be modelledbetween relative effect dose-response parameters. This isautomatically set to |
omega | A scale matrix for the inverse-Wishart prior for the covariance matrix usedto model the correlation between dose-response parameters (see Details for dose-response functions). |
parameters.to.save | A character vector containing names of parametersto monitor in JAGS |
pD | logical; if |
likelihood | A string indicating the likelihood to use in the model. Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
priors | A named list of parameter values (without indices) andreplacement prior distribution values given as stringsusing distributions as specified in JAGS syntax (see Plummer (2017)). Notethat normal distributions in JAGS are specified as
, where
. |
n.iter | number of total iterations per chain (including burn in; default: 20000) |
n.chains | number of Markov chains (default: 3) |
n.burnin | length of burn in, i.e. number of iterations to discard at thebeginning. Default is 'n.iter/2“, that is, discarding the first half of thesimulations. If n.burnin is 0, jags() will run 100 iterations for adaption. |
n.thin | thinning rate. Must be a positive integer. Set |
autojags | A boolean value that indicates whether the model should be continually updated untilit has converged below a specific cutoff of |
Rhat | A cutoff value for the Gelman-Rubin convergence diagnostic(Gelman and Rubin 1992).Unless all parameters have Rhat values lower than this the model will continue to sequentially update upto a maximum of |
n.update | The maximum number of updates. Each update is run for 1000 iterations, after which theRhat values of all parameters are checked against |
model.file | The file path to a JAGS model (.jags file) that can be usedto overwrite the JAGS model that is automatically written based on thespecified options in |
jagsdata | A named list of the data objects to be used in the JAGS model. Onlyrequired if users are defining their own JAGS model using |
... | Arguments to be sent to R2jags. |
Details
When relative effects are modelled on more than one dose-response parameter andcor = TRUE, correlation between the dose-response parameters is automaticallyestimated using a vague Wishart prior. This prior can be made slightly more informativeby specifying the relative scale of variances between the dose-response parameters usingomega.cor will automatically be set toFALSE if class effects are modelled.
Value
An object of S3class(c("mbnma", "rjags")) containing parameterresults from the model. Can be summarized byprint() and can checktraceplots usingR2jags::traceplot() or various functions from the packagemcmcplots.
Nodes that are automatically monitored (if present in the model) have thefollowing 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 ifmethod="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 inclass.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 inclass.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 listconsisting of two elements - an error message from JAGS that can help withdebugging andmodel.arg, a list of arguments provided tombnma.run()which includesjagscode, the JAGS code for the model that can helpusers identify the source of the error.
Dose-response parameter arguments
| Argument | Model specification |
"rel" | Implies thatrelative 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. |
Dose-response function
Several general dose-response functions are provided, but auser-defined dose-response relationship can instead be used.
As of version 0.4.0 dose-response functions are specified as an object ofclass("dosefun"). Seehelp details for each of the functions below for the interpretation of specific dose-response parameters.
Built-in dose-response functions are:
dpoly(): polynomial (e.g. for a linear model -dpoly(degree=1))dloglin(): log-lineardexp(): exponentialdemax(): (emax with/without a Hill parameter)dspline(): splines (can fit B-splines (type="bs"), restricted cubic splines (type="rcs"), natural splines (type="ns"), orpiecewise linear splines (type="ls"))dfpoly(): fractional polynomialsdnonparam(): Non-parametric monotonic function (directioncan be either"increasing"or"decreasing") following the methodof Owen et al. (2015)duser(): user-defined functiondmulti(): allows agent-specific dose-response functions to be fitted. A separate function must be provided for each agentin the network.
References
Gelman A, Rubin DB (1992).“Inference from iterative simulation using multiple sequences.”Statistical Science,7(4), 457-511.https://projecteuclid.org/journals/statistical-science/volume-7/issue-4/Inference-from-Iterative-Simulation-Using-Multiple-Sequences/10.1214/ss/1177011136.full.
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/.
Owen RK, Tincello DG, Keith RA (2015).“Network meta-analysis: development of a three-level hierarchical modeling approach incorporating dose-related constraints.”Value Health,18(1), 116-26.ISSN 1524-4733 (Electronic) 1098-3015 (Linking),doi:10.1016/j.jval.2014.10.006,https://pubmed.ncbi.nlm.nih.gov/25595242/.
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.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)######## Dose-response functions ######### Fit a dose-response MBNMA with a linear function# with common treatment effectsresult <- mbnma.run(network, fun=dpoly(degree=1), method="common")# Fit a dose-response MBNMA with a log-linear function# with random treatment effectsresult <- mbnma.run(network, fun=dloglin(), method="random")# Fit a dose-response MBNMA with a fractional polynomial function# with random treatment effects# with a probit link functionresult <- mbnma.run(network, fun=dfpoly(), method="random", link="probit")# Fit a user-defined function (quadratic)fun.def <- ~ (beta.1 * dose) + (beta.2 * (dose^2))result <- mbnma.run(network, fun=duser(fun=fun.def), method="common")# Fit an Emax function# with a single random (exchangeable) parameter for ED50# with common treatment effectsresult <- mbnma.run(network, fun=demax(emax="rel", ed50="random"), method="common")# Fit an Emax function with a Hill parameter# with a fixed value of 5 for the Hill parameter# with random relative effectsresult <- mbnma.run(network, fun=demax(hill=5), method="random")# Fit a model with natural cubic splines# with 3 knots at 10% 30% and 60% quartiles of dose rangesdepnet <- mbnma.network(ssri) # Using the sSRI depression datasetresult <- mbnma.run(depnet, fun=dspline(type="ns", knots=c(0.1,0.3,0.6)))# Fit a model with different dose-response functions for each agentmultifun <- dmulti(list(dloglin(), # for placebo (can be any function) demax(), # for eletriptan demax(), # for sumatriptan dloglin(), # for frovatriptan demax(), # for almotriptan demax(), # for zolmitriptan dloglin(), # for naratriptan demax())) # for rizatriptanmultidose <- mbnma.run(network, fun=multifun)########## Class effects ########## # Using the osteoarthritis dataset pain.df <- osteopain # Set a shared class (NSAID) only for Naproxcinod and Naproxen pain.df <- pain.df %>% dplyr::mutate( class = dplyr::case_when(agent %in% c("Naproxcinod", "Naproxen") ~ "NSAID", !agent %in% c("Naproxcinod", "Naproxen") ~ agent ) ) # Run an Emax MBNMA with a common class effect on emax painnet <- mbnma.network(pain.df) result <- mbnma.run(painnet, fun = demax(), class.effect = list(emax = "common"))####### Priors ######## Obtain priors from a fractional polynomial functionresult <- mbnma.run(network, fun=dfpoly(degree=1), method="random")print(result$model.arg$priors)# Change the prior distribution for the powernewpriors <- list(power.1 = "dnorm(0,0.001) T(0,)")newpriors <- list(sd = "dnorm(0,0.5) T(0,)")result <- mbnma.run(network, fun=dfpoly(degree=1), method="random", priors=newpriors)########## Sampler options ########### Change the number of MCMC iterations, the number of chains, and the thinresult <- mbnma.run(network, fun=dloglin(), method="random", n.iter=5000, n.thin=5, n.chains=4)####### Examine MCMC diagnostics (using mcmcplots or coda packages) ######## Density plotsmcmcplots::denplot(result)# Traceplotsmcmcplots::traplot(result)# Caterpillar plotsmcmcplots::caterplot(result, "rate")# Autocorrelation plots (using the coda package)coda::autocorr.plot(coda::as.mcmc(result))####### Automatically run jags until convergence is reached ########## Rhat of 1.08 is set as the criteria for convergence#on all monitored parametersconv.res <- mbnma.run(network, fun=demax(), method="random", n.iter=10000, n.burnin=9000, autojags=TRUE, Rhat=1.08, n.update=8)########## Output ############ Print R2jags output and summaryprint(result)summary(result)# Plot forest plot of resultsplot(result)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 |
param | Used to indicate which node to monitor in the model. Can be any parameterin the model code that varies by all arms within all studies. These are some typicalparameters that it might be of interest to monitor, provided they are in the originalmodel 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 |
Value
A data frame containing the posterior mean of the updates by arm and study,with arm and study identifiers.
For MBNMAdose:
facetindicates the agent identifier in the given arm of a studyfupdoseindicates the dose in the given arm of a study
For MBNMAtime:
facetindicates the treatment identifier in the given arm of the studyfupdoseindicates the follow-up time at the given observation in the givenarm of the study
Examples
# Using the triptans datanetwork <- 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 thetambnma.update(result, param="rhat") # monitor rhatmbnma.update(result, param="delta") # monitor deltaValidates that a dataset fulfills requirements for MBNMA
Description
Validates that a dataset fulfills requirements for MBNMA
Usage
mbnma.validate.data(data.ab, single.arm = FALSE)Arguments
data.ab | A data frame of arm-level data in "long" format containing the columns:
|
single.arm | A boolean object to indicate whether to allow single arm studies in the dataset ( |
Details
Checks done within the validation:
Checks data.ab has required column names
Checks there are no NAs
Checks that all SEs are >0 (if variables are included in dataset)
Checks that all doses are >=0
Checks that all r and n are positive (if variables are included in dataset)
Checks that all y, se, r, n and E are numeric
Checks that class codes are consistent within each agent
Checks that agent/class names do not contain restricted characters
Checks that studies have at least two arms (if
single.arm = FALSE)Checks that each study includes at least two treatments
Checks that agent names do not include underscores
Checks that standsd values are consistent within a study
Value
An error if checks are not passed. Runs silently if checks are passed
Write MBNMA dose-response model JAGS code
Description
Writes JAGS code for a Bayesian time-course model for model-based networkmeta-analysis (MBNMA).
Usage
mbnma.write( fun = dpoly(degree = 1), method = "common", regress.mat = NULL, regress.effect = "common", sdscale = FALSE, cor = FALSE, cor.prior = "wishart", omega = NULL, om = list(rel = 5, abs = 10), class.effect = list(), UME = FALSE, likelihood = "binomial", link = NULL)Arguments
fun | An object of |
method | Can take either |
regress.mat | A Nstudy x Ncovariate design matrix of meta-regression covariates |
regress.effect | Indicates whether effect modification should be assumed to be |
sdscale | Logical object to indicate whether to write a model that specifies a reference SDfor standardising when modelling using Standardised Mean Differences. Specifying |
cor | A boolean object that indicates whether correlation should be modelledbetween relative effect dose-response parameters. This isautomatically set to |
cor.prior | NOT CURRENTLY IN USE - indicates the prior distribution to use for the correlation/covariancebetween relative effects. Must be kept as |
omega | A scale matrix for the inverse-Wishart prior for the covariance matrix usedto model the correlation between dose-response parameters (see Details for dose-response functions). |
om | a list with two elements that report the maximum relative ( |
class.effect | A list of named strings that determines which dose-responseparameters to model with a class effect and what that effect should be( |
UME | A boolean object to indicate whether to fit an Unrelated Mean Effects modelthat does not assume consistency and so can be used to test if the consistencyassumption is valid. |
likelihood | A string indicating the likelihood to use in the model. Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
Details
When relative effects are modelled on more than one dose-response parameter andcor = TRUE, correlation between the dose-response parameters is automaticallyestimated using a vague Wishart prior. This prior can be made slightly more informativeby specifying the relative scale of variances between the dose-response parameters usingomega.cor will automatically be set toFALSE if class effects are modelled.
Value
A single long character string containing the JAGS model generatedbased on the arguments passed to the function.
Examples
# Write model code for a model with an exponential dose-response function,# with random treatment effectsmodel <- mbnma.write(fun=dexp(), method="random", likelihood="binomial", link="logit" )names(model) <- NULLprint(model)# Write model code for a model with an Emax dose-response function,# relative effects modelled on Emax with a random effects model,# a single parameter estimated for ED50 with a common effects modelmodel <- mbnma.write(fun=demax(emax="rel", ed50="common"), likelihood="normal", link="identity" )names(model) <- NULLprint(model)# Write model code for a model with an Emax dose-response function,# relative effects modelled on Emax and ED50.# Class effects modelled on ED50 with common effectsmodel <- mbnma.write(fun=demax(), likelihood="normal", link="identity", class.effect=list("ed50"="common") )names(model) <- NULLprint(model)# Write model code for a model with an Emax dose-response function,# relative effects modelled on Emax and ED50 with a# random effects model that automatically models a correlation between# both parameters.model <- mbnma.write(fun=demax(), method="random", likelihood="normal", link="identity", )names(model) <- NULLprint(model)Node-splitting model for testing consistency at the treatment-level
Description
Splits contributions for a given set of treatment comparisons into direct andindirect evidence. A discrepancy between the two suggests that the consistencyassumption required for NMA (and subsequently MBNMA) may violated.
Usage
nma.nodesplit( network, likelihood = NULL, link = NULL, method = "common", comparisons = NULL, drop.discon = TRUE, ...)## S3 method for class 'nma.nodesplit'plot(x, plot.type = NULL, ...)Arguments
network | An object of class |
likelihood | A string indicating the likelihood to use in the model. Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
method | Can take either |
comparisons | A matrix specifying the comparisons to be split (one row per comparison).The matrix must have two columns indicating each treatment for each comparison. Values caneither be character (corresponding to the treatment names given in |
drop.discon | A boolean object that indicates whether to drop treatmentsthat are disconnected at the treatment level. Default is |
... | Arguments to be sent to |
x | An object of |
plot.type | A character string that can take the value of |
Details
The S3 methodplot() on annma.nodesplit object generates eitherforest plots of posterior medians and 95\% credible intervals, or density plotsof posterior densities for direct and indirect evidence.
Value
Plots the desired graph(s) and returns an object (or list of object ifplot.type=NULL) ofclass(c("gg", "ggplot"))
Methods (by generic)
plot(nma.nodesplit): Plot outputs from treatment-level nodesplit models
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)split <- nma.nodesplit(network, likelihood = "binomial", link="logit", method="common")#### To perform nodesplit on selected comparisons ##### Check for closed loops of treatments with independent evidence sourcesloops <- inconsistency.loops(network$data.ab)# This...single.split <- nma.nodesplit(network, likelihood = "binomial", link="logit", method="random", comparisons=rbind(c("sumatriptan_1", "almotriptan_1")))#...is the same as...single.split <- nma.nodesplit(network, likelihood = "binomial", link="logit", method="random", comparisons=rbind(c(6, 12)))# Plot resultsplot(split, plot.type="density") # Plot density plots of posterior densitiesplot(split, plot.type="forest") # Plot forest plots of direct and indirect evidence# Print and summarise resultsprint(split)summary(split) # Generate a data frame of summary resultsConvert normal distribution parameters to corresponding log-normal distribution parameters
Description
Converts mean and variance of normal distribution to the parameters for a log-normaldistribution with the same mean and variance
Usage
norm2lnorm(m, v)Arguments
m | Mean of the normal distribution |
v | Variance of the normal distribution |
Value
A vector of length two. The first element is the mean and the second element is the varianceof the log-normal distribution
Examples
norm <- rnorm(1000, mean=5, sd=2)params <- norm2lnorm(5, 2^2)lnorm <- rlnorm(1000, meanlog=params[1], sdlog=params[2]^0.5)# Mean and SD of lnorm is equivalent to mean and sd of normmean(lnorm)sd(lnorm)Studies of treatments for pain relief in patients with osteoarthritis
Description
A dataset from a systematic review of interventions for pain relief in osteoarthritis, used previouslyin Pedder et al. (2019). The outcome is continuous, and aggregate data responses correspond tothe mean WOMAC pain score at 2 weeks follow-up. The dataset includes 18 Randomised-Controlled Trials (RCTs),comparing 8 different agents with placebo. In total there were 26 different treatments (combination of dose andagent). The active treatments can also be grouped into 3 different classes, within which they have similarmechanisms of action.
Usage
osteopainFormat
A data frame in long format (one row per arm and study), with 74 rows and 7 variables:
studyIDStudy identifiersagentCharacter data indicating the agent to which participants were randomiseddoseNumeric data indicating the standardised dose receivedclassCharacter data indicating the drug class to which the agent belongs toyNumeric data indicating the mean pain score on the WOMAC scale in a study armseNumeric data indicating the standard error for the mean pain score on the WOMAC scale in a study armnNumeric data indicating the number of participants randomised
Source
Pfizer Ltd.
References
Pedder H, Dias S, Bennetts M, Boucher M, Welton NJ (2019).“Modelling time-course relationships with multiple treatments: Model-Based Network Meta-Analysis for continuous summary outcomes.”Res Synth Methods,10(2), 267-286.
Calculate plugin pD from a JAGS model with univariate likelihood for studieswith repeated measurements
Description
Uses results from MBNMA JAGS models to calculate pD via theplugin method (Spiegelhalter et al. 2002). Can only be used for models with knownstandard errors or covariance matrices. Currently only functions with univariate likelihoods. Functionis identical in MBNMAdose and MBNMAtime packages.
Usage
pDcalc( obs1, obs2, fups = NULL, narm, NS, theta.result, resdev.result, likelihood = "normal", type = "time")Arguments
obs1 | A matrix (study x arm) or array (study x arm x time point) containingobserved data for |
obs2 | A matrix (study x arm) or array (study x arm x time point) containingobserved data for |
fups | A numeric vector of length equal to the number of studies,containing the number of follow-up mean responses reported in each study. Required fortime-course MBNMA models (if |
narm | A numeric vector of length equal to the number of studies,containing the number of arms in each study. |
NS | A single number equal to the number of studies in the dataset. |
theta.result | A matrix (study x arm) or array (study x arm x time point)containing the posterior mean predicted means/probabilities/rate in each arm of eachstudy. This will be estimated by the JAGS model. |
resdev.result | A matrix (study x arm) or array (study x arm x time point)containing the posterior mean residual deviance contributions in each arm of eachstudy. This will be estimated by the JAGS model. |
likelihood | A character object of any of the following likelihoods:
|
type | The type of MBNMA model fitted. Can be either |
Details
Method for calculating pD via the plugin method proposed bySpiegelhalter (Spiegelhalter et al. 2002). Standard errors / covariance matrices must be assumedto be known. To obtain values fortheta.result andresdev.result theseparameters must be monitored when running the MBNMA model (usingparameters.to.save).
For non-linear time-course MBNMA models residual deviance contributions may be skewed, whichcan lead to non-sensical results when calculating pD via the plugin method.Alternative approaches are to use pV as an approximation orpD calculated by Kullback-Leibler divergence (Plummer 2008).
Value
A single numeric value for pD calculated via the plugin method.
References
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/.
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.
Examples
# Using the triptans datanetwork <- 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"))#### Calculate pD for binomial data ##### Prepare data for pD calculationr <- result$model$data()$rn <- result$model$data()$nnarm <- result$model$data()$narmNS <- result$model$data()$NSpsi <- result$BUGSoutput$median$psiresdevs <- result$BUGSoutput$median$resdev# Calculate pD via plugin methodpD <- pDcalc(obs1=r, obs2=n, narm=narm, NS=NS, theta.result=psi, resdev.result=resdevs, likelihood="binomial", type="dose")Forest plot for results from dose-response MBNMA models
Description
Generates a forest plot for dose-response parameters.
Usage
## S3 method for class 'mbnma'plot(x, params = NULL, ...)Arguments
x | An S3 object of class |
params | A character vector of dose-response parameters to plot.Parameters must be given the same name as monitored nodes in |
... | Arguments to be passed to methods, such as graphical parameters |
Value
A forest plot of classc("gg", "ggplot") that has separate panels fordifferent dose-response parameters. Results are plotted on the link scale.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an exponential dose-response MBNMA and generate the forest plotexponential <- mbnma.run(network, fun=dexp())plot(exponential)# Plot only Emax parameters from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")plot(emax, params=c("emax"))#### Forest plots including class effects ##### Generate some classes for the dataclass.df <- triptansclass.df$class <- ifelse(class.df$agent=="placebo", "placebo", "active1")class.df$class <- ifelse(class.df$agent=="eletriptan", "active2", class.df$class)netclass <- mbnma.network(class.df)emax <- mbnma.run(netclass, fun=demax(), method="random", class.effect=list("ed50"="common"))Create an mbnma.network object
Description
Creates an object ofclass("mbnma.network"). Various MBNMA functions can subsequently be appliedto this object.
Usage
## S3 method for class 'mbnma.network'plot( x, level = "treatment", v.color = "connect", doselink = NULL, layout = igraph::in_circle(), remove.loops = FALSE, edge.scale = 1, v.scale = NULL, label.distance = 0, legend = TRUE, legend.x = "bottomleft", legend.y = NULL, ...)mbnma.network(data.ab, description = "Network")Arguments
x | An object of class |
level | A string indicating whether nodes/facets should represent |
v.color | Can take either |
doselink | If given an integer value it indicates that connections via the dose-responserelationship with placebo should be plotted. The integer represents the minimum number of dosesfrom which a dose-response function could be estimated and is equivalent to the number ofparameters in the desired dose-response function plus one. If left as |
layout | An igraph layout specification. This is a function specifying an igraphlayout that determines the arrangement of the vertices (nodes). The default |
remove.loops | A boolean value indicating whether to include loops thatindicate comparisons within a node. |
edge.scale | A number to scale the thickness of connecting lines(edges). Line thickness is proportional to the number of studies for agiven comparison. Set to 0 to make thickness equal for all comparisons. |
v.scale | A number with which to scale the size of the nodes. If the variable |
label.distance | A number scaling the distance of labels from the nodesto improve readability. The labels will be directly on top of the nodes ifthe default of 0 is used. Option only applicable if |
legend | A boolean object to indicate whether or not to plot a legend to indicate which node colourcorresponds to which agent if |
legend.x,legend.y | The x and y co-ordinates to be used to position the legend. They can be specifiedby keyword or in any way which is accepted by |
... | Options for plotting in |
data.ab | A data frame of arm-level data in "long" format containing the columns:
|
description | Optional. Short description of the network. |
Details
The S3 methodplot() on anmbnma.network object generates anetwork plot that shows how different treatments are connected within thenetwork via study comparisons. This can be used to identify how direct andindirect evidence are informing different treatment comparisons. Depends onigraph.
Agents/classes for arms that have dose = 0 will be relabelled as"Placebo".Missing values (NA) cannot be included in the dataset. Single arm studies cannotbe included.
Value
plot(): An object ofclass("igraph") - any functions from theigraph packagecan be applied to this object to change its characteristics.
mbnma.network(): An object ofclass("mbnma.network") which is a list containing:
descriptionA short description of the networkdata.abA data frame containing the arm-level network data (treatment identifiers will havebeen recoded to a sequential numeric code)studyIDA character vector with the IDs of included studiesagentsA character vector indicating the agent identifiers that correspond to thenew agent codes.treatmentsA character vector indicating the treatment identifiers that correspondto the new treatment codes.classesA character vector indicating the class identifiers (if included in the original data)that correspond to the new class codes.
Methods (by generic)
plot(mbnma.network): Generate a network plot
Examples
# Create an mbnma.network object from the datanetwork <- mbnma.network(triptans)# Generate a network plot from the dataplot(network)# Generate a network plot at the agent level that removes loops indicating comparisons#within a nodeplot(network, level="agent", remove.loops=TRUE)# Generate a network plot at the treatment level that colours nodes by agentplot(network, v.color="agent", remove.loops=TRUE)# Generate a network plot that includes connections via the dose-response function# For a one parameter dose-response function (e.g. exponential)plot(network, level="treatment", doselink=1, remove.loops=TRUE)# For a two parameter dose-response function (e.g. Emax)plot(network, level="treatment", doselink=2, remove.loops=TRUE)# Arrange network plot in a star with the reference treatment in the centreplot(network, layout=igraph::as_star(), label.distance=3)#### Plot a network with no placebo data included ##### Make data with no placebonoplac.df <- network$data.ab[network$data.ab$narm>2 & network$data.ab$agent!=1,]net.noplac <- mbnma.network(noplac.df)# Plotting network automatically plots connections to Placebo via dose-responseplot(net.noplac)# Using the triptans headache datasetprint(triptans)# Define networknetwork <- mbnma.network(triptans, description="Example network")summary(network)plot(network)Plots predicted responses from a dose-response MBNMA model
Description
Plots predicted responses on the natural scale from a dose-response MBNMA model.
Usage
## S3 method for class 'mbnma.predict'plot( x, disp.obs = FALSE, overlay.split = FALSE, method = "common", agent.labs = NULL, scales = "free_x", ...)Arguments
x | An object of class |
disp.obs | A boolean object to indicate whether to show the location of observed dosesin the data on the 95\% credible intervals of the predicted dose-response curves as shaded regions ( |
overlay.split | A boolean object indicating whether to overlay a lineshowing the split (treatment-level) NMA results on the plot ( |
method | Indicates the type of split (treatment-level) NMA to perform when |
agent.labs | A character vector of agent labels to display on plots. Ifleft as |
scales | Should scales be fixed ( |
... | Arguments for |
Details
For the S3 methodplot(), it is advisable to ensure predictions inpredict are estimated using a sufficient number of doses to ensure a smoothpredicted dose-response curve. Ifdisp.obs = TRUE it isadvisable to ensure predictions inpredict are estimated using an evensequence of time points to avoid misrepresentation of shaded densities.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMA and predict responsesemax <- mbnma.run(network, fun=demax(), method="random")pred <- predict(emax, E0 = 0.5)plot(pred)# Display observed doses on the plotplot(pred, disp.obs=TRUE)# Display split NMA results on the plotplot(pred, overlay.split=TRUE)# Split NMA results estimated using random treatment effects modelplot(pred, overlay.split=TRUE, method="random")# Add agent labelsplot(pred, agent.labs=c("Elet", "Suma", "Frov", "Almo", "Zolmi", "Nara", "Riza"))# These labels will throw an error because "Placebo" is included in agent.labs when#it will not be plotted as a separate panel#### ERROR #####plot(pred, agent.labs=c("Placebo", "Elet", "Suma", "Frov", "Almo", "Zolmi",# "Nara", "Riza"))# If insufficient predictions are made across dose-response function# then the plotted responses are less smooth and can be misleadingpred <- predict(emax, E0 = 0.5, n.doses=3)plot(pred)Plot histograms of rankings from MBNMA models
Description
Plot histograms of rankings from MBNMA models
Usage
## S3 method for class 'mbnma.rank'plot(x, params = NULL, treat.labs = NULL, ...)Arguments
x | An object of class |
params | A character vector of named parameters in the model that vary by either agentor class (depending on the value assigned to |
treat.labs | A vector of treatment labels in the same order as treatment codes.Easiest to use treatment labels stored by |
... | Arguments to be sent to |
Value
A series of histograms that show rankings for each treatment/agent/prediction, with aseparate panel for each parameter.The object returned is a list containing a separate element for each parameter inparamswhich is an object ofclass(c("gg", "ggplot")).
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Estimate rankings from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")ranks <- rank(emax)# Plot rankings for both dose-response parameters (in two separate plots)plot(ranks)# Plot rankings just for ED50plot(ranks, params="ed50")# Plot rankings from predictiondoses <- list("eletriptan"=c(0,1,2,3), "rizatriptan"=c(0.5,1,2))pred <- predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)", exact.doses=doses)rank <- rank(pred)plot(rank)# Trying to plot a parameter that has not been ranked will return an error#### ERROR ##### plot(ranks, params="not.a.parameter")Run an NMA model
Description
Used for calculating treatment-level NMA results, either when comparing MBNMA models to models thatmake no assumptions regarding dose-response , or to estimate split results foroverlay.split.Results can also be compared between consistency (UME=FALSE) and inconsistency(UME=TRUE) models to test the validity of the consistency assumption at the treatment-level.
Usage
## S3 method for class 'nma'plot(x, bydose = TRUE, scales = "free_x", ...)nma.run( network, method = "common", likelihood = NULL, link = NULL, priors = NULL, sdscale = FALSE, warn.rhat = TRUE, n.iter = 20000, drop.discon = TRUE, UME = FALSE, pD = TRUE, parameters.to.save = NULL, ...)Arguments
x | An object of |
bydose | A boolean object indicating whether to plot responses with doseon the x-axis ( |
scales | Should scales be fixed ( |
... | Arguments to be sent to |
network | An object of class |
method | Indicates the type of split (treatment-level) NMA to perform when |
likelihood | A string indicating the likelihood to use in the model. Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
priors | A named list of parameter values (without indices) andreplacement prior distribution values given as stringsusing distributions as specified in JAGS syntax (see Plummer (2017)). Notethat normal distributions in JAGS are specified as
, where
. |
sdscale | Logical object to indicate whether to write a model that specifies a reference SDfor standardising when modelling using Standardised Mean Differences. Specifying |
warn.rhat | A boolean object to indicate whether to return a warning if Rhat valuesfor any monitored parameter are >1.02 (suggestive of non-convergence). |
n.iter | number of total iterations per chain (including burn in; default: 20000) |
drop.discon | A boolean object that indicates whether or not to drop disconnectedstudies from the network. |
UME | A boolean object to indicate whether to fit an Unrelated Mean Effects modelthat does not assume consistency and so can be used to test if the consistencyassumption is valid. |
pD | logical; if |
parameters.to.save | A character vector containing names of parametersto monitor in JAGS |
Functions
plot(nma): Plot outputs from treatment-level NMA modelsResults can be plotted either as a single forest plot, or facetted by agentand plotted with increasing dose in order to identify potential dose-responserelationships. If Placebo (or any agents with dose=0) is included in the networkthen this will be used as the reference treatment, but if it is not then resultswill be plotted versus the network reference used in the NMA object (
x).
Examples
# Run random effects NMA on the alogliptin datasetalognet <- mbnma.network(alog_pcfb)nma <- nma.run(alognet, method="random")print(nma)plot(nma)# Run common effects NMA keeping treatments that are disconnected in the NMAgoutnet <- mbnma.network(gout)nma <- nma.run(goutnet, method="common", drop.discon=FALSE)# Run an Unrelated Mean Effects (UME) inconsistency model on triptans datasettripnet <- mbnma.network(triptans)ume <- nma.run(tripnet, method="random", UME=TRUE)Predict responses for different doses of agents in a given population based on MBNMAdose-response models
Description
Used to predict responses for different doses of agents or to predictthe results of a new study. This is calculated by combiningrelative treatment effects with a given reference treatment response(specific to the population of interest).
Usage
## S3 method for class 'mbnma'predict( object, n.doses = 30, exact.doses = NULL, E0 = 0.2, synth = "fixed", lim = "cred", regress.vals = NULL, ...)Arguments
object | An S3 object of class |
n.doses | A number indicating the number of doses at which to make predictionswithin each agent. The default is |
exact.doses | A list of numeric vectors. Each named element in the list corresponds to anagent (either named similarly to agent names given in the data, or namedcorrespondingly to the codes for agents given in |
E0 | An object to indicate the value(s) to use for the response at dose = 0 (i.e.placebo) in the prediction. This can take a number of different formats dependingon how it will be used/calculated. The default is
|
synth | A character object that can take the value |
lim | Specifies calculation of either 95% credible intervals ( |
regress.vals | A named numeric vector of effect modifier values at which results shouldbe predicted. Named elements must match variable names specified in |
... | Arguments to be sent to |
Details
The range of doses on which to make predictions can be specified in one of two ways:
Use
max.doseandn.dosesto specify the maximum dose for each agent and thenumber of doses within that agent for which to predict responses. Doses will be chosenthat are equally spaced from zero to the maximum dose for each agent. This is usefulfor generating plots of predicted responses (using[plot-mbnma.predict]) as it willlead to fitting a smooth dose-response curve (providedn.dosesis sufficiently high).Use
exact.dosesto specify the exact doses for which to predict responses for eachagent. This may be more useful when ranking different predicted responses using[rank-mbnma.predict]
Value
An S3 object of classmbnma.predict that contains the followingelements:
predictsA named list ofmatrices. Each matrix contains the MCMC results of predicted responses atfollow-up times specified intimesfor each treatment specified intreatslikelihoodThe likelihood used in the MBNMA modelobjectlinkThe link function used in the MBNMA modelobjectnetworkThe dataset inmbnma.networkformatE0A numeric vector of value(s) used for E0 in the prediction, on thelink scale.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")################################# Specifying E0 ##################################### Predict responses using deterministic value for E0 ##### Data is binomial so we specify E0 on the natural scale as a probabilitypred <- predict(emax, E0 = 0.2)# Specifying non-sensical values will return an error#pred <- predict(emax, E0 = -10)### ERROR ####### Predict responses using stochastic value for E0 ##### Data is binomial so we might want to draw from a beta distributionpred <- predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)")# Misspecifying the RNG string will return an error#pred <- predict(emax, E0 = "rbeta(shape1=1, shape2=5)")### ERROR ####### Predict responses using meta-analysis of dose = 0 studies ##### E0 is assigned a data frame of studies to synthesis# Can be taken from placebo arms in triptans datasetref.df <- network$data.ab[network$data.ab$agent==1,]# Synthesis can be fixed/random effectspred <- predict(emax, E0 = ref.df, synth="random")########################################################################## Specifying which doses/agents for which to predict responses ########################################################################### Change the number of predictions for each agentpred <- predict(emax, E0 = 0.2, n.doses=20)pred <- predict(emax, E0 = 0.2, n.doses=3)# Specify several exact combinations of doses and agents to predictpred <- predict(emax, E0 = 0.2, exact.doses=list("eletriptan"=c(0:5), "sumatriptan"=c(1,3,5)))plot(pred) # Plot predictions# Print and summarise `mbnma.predict` objectprint(pred)summary(pred)# Plot `mbnma.predict` objectplot(pred)Print mbnma.network information to the console
Description
Print mbnma.network information to the console
Usage
## S3 method for class 'mbnma.network'print(x, ...)Arguments
x | An object of class |
... | further arguments passed to or from other methods |
Print summary information from an mbnma.predict object
Description
Print summary information from an mbnma.predict object
Usage
## S3 method for class 'mbnma.predict'print(x, ...)Arguments
x | An object of |
... | further arguments passed to or from other methods |
Prints summary information about an mbnma.rank object
Description
Prints summary information about an mbnma.rank object
Usage
## S3 method for class 'mbnma.rank'print(x, ...)Arguments
x | An object of class |
... | further arguments passed to or from other methods |
Prints summary results from an nma.nodesplit object
Description
Prints summary results from an nma.nodesplit object
Usage
## S3 method for class 'nma.nodesplit'print(x, ...)Arguments
x | An object of |
... | further arguments passed to or from other methods |
Prints summary results from a nodesplit object
Description
Prints summary results from a nodesplit object
Usage
## S3 method for class 'nodesplit'print(x, ...)Arguments
x | An object of |
... | further arguments passed to or from other methods |
Print posterior medians (95% credible intervals) for table of relative effects/meandifferences between treatments/classes
Description
Print posterior medians (95% credible intervals) for table of relative effects/meandifferences between treatments/classes
Usage
## S3 method for class 'relative.array'print(x, digits = 2, ...)Arguments
x | An object of class |
digits | An integer indicating the number of significant digits to be used. |
... | further arguments passed to |
Studies of biologics for treatment of moderate-to-severe psoriasis (100% improvement)
Description
A dataset from a systematic review of Randomised-Controlled Trials (RCTs) comparing biologics at different doses and placebo(Warren et al. 2019). The outcome is the number of patients experiencing 100% improvement on the PsoriasisArea and Severity Index (PASI) measured at 12 weeks follow-up. The datasetincludes 19 Randomised-Controlled Trials (RCTs), comparing 8 different biologics at different doses with placebo.
Usage
psoriasis100Format
A data frame in long format (one row per arm and study), with 81 rows and 9 variables:
studyIDStudy identifiersagentCharacter data indicating the agent to which participants were randomiseddose_mgNumeric data indicating the dose to which participants were randomised in mgfreqCharacter data indicating the frequency of the dose to which participants were randomiseddoseNumeric data indicating the dose in mg/week to which the participants were randomisednNumeric data indicating the number of participants randomisedrNumeric data indicating the number of participants who achieved 100% improvement in PASI score after 12 weeks
References
Warren RB, Gooderham M, Burge R, Zhu B, Amato D, Liu KH, Shrom D, Guo J, Brnabic A, Blauvelt A (2019).“Comparison of cumulative clinical benefits of biologics for the treatment of psoriasis over 16 weeks: Results from a network meta-analysis.”J Am Acad Dermatol,82(5), 1138-1149.
Studies of biologics for treatment of moderate-to-severe psoriasis (>=75% improvement)
Description
A dataset from a systematic review of Randomised-Controlled Trials (RCTs) comparing biologics at different doses and placebo(Warren et al. 2019). The outcome is the number of patients experiencing >=75% improvement on the PsoriasisArea and Severity Index (PASI) measured at 12 weeks follow-up. The datasetincludes 28 Randomised-Controlled Trials (RCTs), comparing 9 different biologics at different doses with placebo.
Usage
psoriasis75Format
A data frame in long format (one row per arm and study), with 81 rows and 9 variables:
studyIDStudy identifiersagentCharacter data indicating the agent to which participants were randomiseddose_mgNumeric data indicating the dose to which participants were randomised in mgfreqCharacter data indicating the frequency of the dose to which participants were randomiseddoseNumeric data indicating the dose in mg/week to which the participants were randomisednNumeric data indicating the number of participants randomisedrNumeric data indicating the number of participants who achieved >=75% improvement in PASI score after 12 weeks
References
Warren RB, Gooderham M, Burge R, Zhu B, Amato D, Liu KH, Shrom D, Guo J, Brnabic A, Blauvelt A (2019).“Comparison of cumulative clinical benefits of biologics for the treatment of psoriasis over 16 weeks: Results from a network meta-analysis.”J Am Acad Dermatol,82(5), 1138-1149.
Studies of biologics for treatment of moderate-to-severe psoriasis (>=90% improvement)
Description
A dataset from a systematic review of Randomised-Controlled Trials (RCTs) comparing biologics at different doses and placebo(Warren et al. 2019). The outcome is the number of patients experiencing >=90% improvement on the PsoriasisArea and Severity Index (PASI) measured at 12 weeks follow-up. The datasetincludes 24 Randomised-Controlled Trials (RCTs), comparing 9 different biologics at different doses with placebo.
Usage
psoriasis90Format
A data frame in long format (one row per arm and study), with 81 rows and 9 variables:
studyIDStudy identifiersagentCharacter data indicating the agent to which participants were randomiseddose_mgNumeric data indicating the dose to which participants were randomised in mgfreqCharacter data indicating the frequency of the dose to which participants were randomiseddoseNumeric data indicating the dose in mg/week to which the participants were randomisednNumeric data indicating the number of participants randomisedrNumeric data indicating the number of participants who achieved >=90% improvement in PASI score after 12 weeks
References
Warren RB, Gooderham M, Burge R, Zhu B, Amato D, Liu KH, Shrom D, Guo J, Brnabic A, Blauvelt A (2019).“Comparison of cumulative clinical benefits of biologics for the treatment of psoriasis over 16 weeks: Results from a network meta-analysis.”J Am Acad Dermatol,82(5), 1138-1149.
Set rank as a method
Description
Set rank as a method
Usage
rank(x, ...)Arguments
x | An object on which to apply the rank method |
... | Arguments to be passed to methods |
Rank parameter estimates
Description
Only parameters that vary by agent/class can be ranked.
Usage
## S3 method for class 'mbnma'rank( x, params = NULL, lower_better = TRUE, level = "agent", to.rank = NULL, ...)Arguments
x | An object on which to apply the rank method |
params | A character vector of named parameters in the model that vary by either agentor class (depending on the value assigned to |
lower_better | Indicates whether negative responses are better ( |
level | Can be set to |
to.rank | A numeric vector containing the codes for the agents/classes you wish to rank.If left |
... | Arguments to be passed to methods |
Details
Ranking cannot currently be performed on non-parametric dose-response MBNMA
Value
An object ofclass("mbnma.rank") which is a list containing a summary dataframe, a matrix of rankings for each MCMC iteration, a matrix of probabilitiesthat each agent has a particular rank, and a matrix of cumulative ranking probabilitiesfor each agent, for each parameter that has been ranked.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Rank selected agents from a log-linear dose-response MBNMAloglin <- mbnma.run(network, fun=dloglin())ranks <- rank(loglin, to.rank=c("zolmitriptan", "eletriptan", "sumatriptan"))summary(ranks)# Rank only ED50 parameters from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")ranks <- rank(emax, params="ed50")summary(ranks)#### Ranking by class ##### Generate some classes for the dataclass.df <- triptansclass.df$class <- ifelse(class.df$agent=="placebo", "placebo", "active1")class.df$class <- ifelse(class.df$agent=="eletriptan", "active2", class.df$class)netclass <- mbnma.network(class.df)emax <- mbnma.run(netclass, fun=demax(), method="random", class.effect=list("ed50"="common"))# Rank by class, with negative responses being worseranks <- rank(emax, level="class", lower_better=FALSE)print(ranks)# Print and generate summary data frame for `mbnma.rank` objectsummary(ranks)print(ranks)# Plot `mbnma.rank` objectplot(ranks)Rank predicted doses of different agents
Description
Ranks predictions at different doses from best to worst.
Usage
## S3 method for class 'mbnma.predict'rank(x, lower_better = TRUE, rank.doses = NULL, ...)Arguments
x | An object on which to apply the rank method |
lower_better | Indicates whether negative responses are better ( |
rank.doses | A list of numeric vectors. Each named element corresponds to anagent (as named/coded in |
... | Arguments to be passed to methods |
Details
Ifpredict contains multiple predictions at dose=0, then only the first of thesewill be included, to avoid duplicating rankings.
Value
An object ofclass("mbnma.rank") which is a list containing a summary dataframe, a matrix of rankings for each MCMC iteration, and a matrix of probabilitiesthat each agent has a particular rank, for each parameter that has been ranked.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Rank all predictions from a log-linear dose-response MBNMAloglin <- mbnma.run(network, fun=dloglin())pred <- predict(loglin, E0 = 0.5)rank <- rank(pred)summary(rank)# Rank selected predictions from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")doses <- list("eletriptan"=c(0,1,2,3), "rizatriptan"=c(0.5,1,2))pred <- predict(emax, E0 = "rbeta(n, shape1=1, shape2=5)", exact.doses=doses)rank <- rank(pred, rank.doses=list("eletriptan"=c(0,2), "rizatriptan"=2))# Print and generate summary data frame for `mbnma.rank` objectsummary(rank)print(rank)# Plot `mbnma.rank` objectplot(rank)Rank relative effects obtained between specific doses
Description
Ranks"relative.table" objects generated byget.relative().
Usage
## S3 method for class 'relative.array'rank(x, lower_better = TRUE, ...)Arguments
x | An object on which to apply the rank method |
lower_better | Indicates whether negative responses are better ( |
... | Arguments to be passed to methods |
Value
An object ofclass("mbnma.rank") which is a list containing a summary dataframe, a matrix of rankings for each MCMC iteration, and a matrix of probabilitiesthat each agent has a particular rank, for each parameter that has been ranked.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Rank selected predictions from an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")rels <- get.relative(emax)rank <- rank(rels, lower_better=TRUE)# Print and generate summary data frame for `mbnma.rank` objectsummary(rank)print(rank)# Plot `mbnma.rank` objectplot(rank)Assigns agent or class variables numeric identifiers
Description
Assigns agent or class variables numeric identifiers
Usage
recode.agent(data.ab, level = "agent")Arguments
data.ab | A data frame of arm-level data in "long" format containing the columns:
|
level | Can take either |
Details
Also relabels the agent for any arms in which dose = 0 to "Placebo_0"
Value
A list containing a data frame with recoded agent/class identifiers anda character vector of original agent/class names
Synthesise single arm dose = 0 / placebo studies to estimate E0
Description
Synthesises single arm studies to estimate E0. Used in predicting responses from adose-response MBNMA.
Usage
ref.synth( data.ab, mbnma, synth = "fixed", n.iter = mbnma$BUGSoutput$n.iter, n.burnin = mbnma$BUGSoutput$n.burnin, n.thin = mbnma$BUGSoutput$n.thin, n.chains = mbnma$BUGSoutput$n.chains, ...)Arguments
data.ab | A data frame of arm-level data in "long" format containing thecolumns:
|
mbnma | An S3 object of class |
synth | A character object that can take the value |
n.iter | number of total iterations per chain (including burn in;default: 2000) |
n.burnin | length of burn in, i.e. number of iterations todiscard at the beginning. Default is |
n.thin | thinning rate. Must be a positive integer. Set |
n.chains | number of Markov chains (default: 3) |
... | Arguments to be sent to |
Details
data.ab can be a collection of studies that closely resemble thepopulation of interest intended for the prediction, which could bedifferent to those used to estimate the MBNMA model, and could includesingle arms of RCTs or observational studies. If other data is notavailable, the data used to estimate the MBNMA model can be used byselecting only the studies and arms that investigate dose = 0 (placebo).
Defaults forn.iter,n.burnin,n.thin andn.chains are those used to estimatembnma.
Value
A list of named elements corresponding to E0 and the between-study standard deviation forE0 ifsynth="random". Each element contains the full MCMC results from the synthesis.
Examples
# Using the triptans datanetwork <- mbnma.network(triptans)# Run an Emax dose-response MBNMAemax <- mbnma.run(network, fun=demax(), method="random")# Data frame for synthesis can be taken from placebo armsref.df <- triptans[triptans$agent=="placebo",]# Meta-analyse placebo studies using fixed treatment effectsE0 <- ref.synth(ref.df, emax, synth="fixed")names(E0)# Meta-analyse placebo studies using random treatment effectsE0 <- ref.synth(ref.df, emax, synth="random")names(E0)Rescale data depending on the link function provided
Description
Rescale data depending on the link function provided
Usage
rescale.link(x, direction = "link", link = "logit")Arguments
x | A numeric vector of data to be rescaled |
direction | Can take either |
link | A string indicating the link function to use in the model. Can take any link functiondefined within JAGS (e.g. |
Value
A rescaled numeric vector
Studies of wound closure methods to reduce Surgical Site Infections (SSI)
Description
A dataset from an ongoing systematic review examining the efficacy of different wound closure methods to reduce surgicalsite infections (SSI). The outcome is binary and represents the number of patients who experienced a SSI. The datasetincludes 129 RCTs comparing 16 different interventions in 6 classes. This dataset is primarily used to illustratehowMBNMAdose can be used to perform different types of network meta-analysis without dose-response information.
Usage
ssi_closureFormat
A data frame in long format (one row per arm and study), with 281 rows and 6 variables:
studyIDStudy identifiersYearYear of publicationnNumeric data indicating the number of participants randomisedrNumeric data indicating the number of participants who achieved >50% improvement in depression symptomstrtTreatment names, given as character dataclassClass names, given as character data
Studies of Selective Serotonin Reuptake Inhibitors (SSRIs) for major depression
Description
A dataset from a systematic review examining the efficacy of different doses of SSRI antidepressant drugs and placebo(Furukawa et al. 2019). The response to treatment is defined as a 50% reduction in depressive symptoms after 8 weeks(4-12 week range) follow-up. The dataset includes 60 RCTs comparing 5 different SSRIs with placebo.
Usage
ssriFormat
A data frame in long format (one row per arm and study), with 145 rows and 8 variables:
studyIDStudy identifiersbiasRisk of bias evaluated on 6 domainsageMean participant ageweeksDuration of study follow-upagentCharacter data indicating the agent to which participants were randomiseddoseNumeric data indicating the dose to which participants were randomised in mgnNumeric data indicating the number of participants randomisedrNumeric data indicating the number of participants who achieved >50% improvement in depression symptoms
References
Furukawa TA, Cipriani A, Cowen PJ, Leucht S, Egger M, Salanti G (2019).“Optimal dose of selective serotonin reuptake inhibitors, venlafaxine, and mirtazapine in major depression: a systematic review and dose-response meta-analysis.”Lancet Psychiatry,6, 601-609.
Print summary of MBNMA results to the console
Description
Print summary of MBNMA results to the console
Usage
## S3 method for class 'mbnma'summary(object, digits = 4, ...)Arguments
object | An S3 object of class |
digits | The maximum number of digits for numeric columns |
... | additional arguments affecting the summary produced |
Print summary mbnma.network information to the console
Description
Print summary mbnma.network information to the console
Usage
## S3 method for class 'mbnma.network'summary(object, ...)Arguments
object | An object of class |
... | further arguments passed to or from other methods |
Produces a summary data frame from an mbnma.predict object
Description
Produces a summary data frame from an mbnma.predict object
Usage
## S3 method for class 'mbnma.predict'summary(object, ...)Arguments
object | An object of |
... | additional arguments affecting the summary produced. |
Value
A data frame containing posterior summary statistics from predicted responsesfrom a dose-response MBNMA model
Generates summary data frames for an mbnma.rank object
Description
Generates summary data frames for an mbnma.rank object
Usage
## S3 method for class 'mbnma.rank'summary(object, ...)Arguments
object | An object of |
... | additional arguments affecting the summary produced |
Value
A list in which each element represents a parameter that has been rankedinmbnma.rank and contains a data frame of summary ranking results.
Generates a summary data frame for nma.nodesplit objects
Description
Generates a summary data frame for nma.nodesplit objects
Usage
## S3 method for class 'nma.nodesplit'summary(object, ...)Arguments
object | An object of |
... | further arguments passed to or from other methods |
Generates a summary data frame for nodesplit objects
Description
Generates a summary data frame for nodesplit objects
Usage
## S3 method for class 'nodesplit'summary(object, ...)Arguments
object | An object of |
... | further arguments passed to or from other methods |
Studies of triptans for headache pain relief
Description
A dataset from a systematic review of interventions for pain relief in migraine (Thorlund et al. 2014).The outcome is binary, and represents (as aggregate data) the proportion of participants who wereheadache-free at 2 hours. Data are from patients who had had at least one migraine attack, who werenot lost to follow-up, and who did not violate the trial protocol. The dataset includes 70 Randomised-ControlledTrials (RCTs), comparing 7 triptans with placebo. Doses are standardised as relative to a "common" dose,and in total there are 23 different treatments (combination of dose and agent).
Usage
triptansFormat
A data frame in long format (one row per arm and study), with with 181 rows and 6 variables:
studyIDStudy identifiersAuthorYearThe author and year published of the studynNumeric data indicating the number of participants in a study armrNumeric data indicating the number of responders (headache free at 2 hours) in a study armdoseNumeric data indicating the standardised dose receivedagentFactor data indicating the agent to which participants were randomised
Source
There are no references for Rd macro\insertAllCites on this help page.