# mbnma.emax: Run MBNMA model with an Emax dose-response function (without... In MBNMAdose: Dose-Response MBNMA Models

## Description

Fits a Bayesian model-based network meta-analysis (MBNMA) with a defined dose-response function. Follows the methods of \insertCitemawdsley2016;textualMBNMAdose. This function acts as a wrapper for `mbnma.run()` that uses more clearly defined parameter names.

## Usage

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18``` ```mbnma.emax( network, emax = "rel", ed50 = "rel", method = "common", class.effect = list(), UME = FALSE, cor = TRUE, var.scale = NULL, parameters.to.save = NULL, pd = "pv", parallel = FALSE, likelihood = NULL, link = NULL, priors = NULL, arg.params = NULL, ... ) ```

## Arguments

 `network` An object of class `mbnma.network`. `emax` Refers to the Emax parameter of the Emax dose-response function. Can take either `"rel"`, `"common"`, `"random"`, or be assigned a numeric value (see details). `ed50` Refers to the ED50 parameter of the Emax dose-response function. Can take either `"rel"`, `"common"`, `"random"`, or be assigned a numeric value (see details). `method` Can take either `"common"` or `"random"` to indicate whether relative effects should be modelled with between-study heterogeneity or not (see details). `class.effect` A list of named strings that determines which dose-response parameters to model with a class effect and what that effect should be (`"common"` or `"random"`). Element names should match dose-response parameter names (which will therefore depend on whether or not a wrapper function has been used for `mbnma.run()`). For example: `list("beta.2"="fixed", "beta.3"="random")` when using `mbnma.run()` or `list("ed50"="fixed", "hill"="random")` when using `mbnma.emax.hill()`. `UME` A boolean object to indicate whether to fit an Unrelated Mean Effects model that does not assume consistency and so can be used to test if the consistency assumption is valid. `cor` A boolean object that indicates whether correlation should be modelled between relative effect dose-response parameters (`TRUE`) or not (`FALSE`). This is automatically set to `FALSE` if class effects are modelled or if multiple dose-response functions are fitted. `var.scale` A numeric vector indicating the relative scale of variances between correlated dose-response parameters when relative effects are modelled on more than one dose-response parameter and `cor=TRUE` (see details). Each element of the vector refers to the relative scale of each of the dose-response parameters that is modelled using relative effects. `parameters.to.save` A character vector containing names of parameters to monitor in JAGS `pd` Can take either: `pv` only pV will be reported (as automatically outputted by `R2jags`). `plugin` calculates pD by the plug-in method \insertCitespiegelhalter2002MBNMAdose. It is faster, but may output negative non-sensical values, due to skewed deviances that can arise with non-linear models. `pd.kl` calculates pD by the Kullback-Leibler divergence \insertCiteplummer2008MBNMAdose. This will require running the model for additional iterations but will always produce a positive result. `popt` calculates pD using an optimism adjustment which allows for calculation of the penalized expected deviance \insertCiteplummer2008MBNMAdose `parallel` A boolean value that indicates whether JAGS should be run in parallel (`TRUE`) or not (`FALSE`). If `TRUE` then the number of cores to use is automatically calculated. `likelihood` A string indicating the likelihood to use in the model. Can take either `"binomial"`, `"normal"` or `"poisson"`. If left as `NULL` the likelihood will be inferred from the data. `link` A string indicating the link function to use in the model. Can take any link function defined within JAGS (e.g. `"logit"`, `"log"`, `"probit"`, `"cloglog"`) or be assigned the value `"identity"` for and identity link function. If left as `NULL` the link function will be automatically assigned based on the likelihood. `priors` A named list of parameter values (without indices) and replacement prior distribution values given as strings using distributions as specified in JAGS syntax (see examples). `arg.params` Contains a list of arguments sent to `mbnma.run()` by dose-response specific wrapper functions `...` Arguments to be sent to R2jags.

## Value

An object of S3 `class(c("mbnma", "rjags"))` containing parameter results from the model. Can be summarized by `print()` and can check traceplots using `R2jags::traceplot()` or various functions from the package `mcmcplots`.

Nodes that are automatically monitored (if present in the model) have the following interpretation. These will have an additional suffix that relates to the name/number of the dose-response parameter to which they correspond (e.g. `d.ed50` or `d.1`):

• `d` The pooled effect for each agent for a given dose-response parameter. Will be estimated by the model if dose-response parameters (`beta.1`, `beta.2`, `beta.3`, `beta.4`) are set to `"rel"`.

• `sd` (without a suffix) - the between-study SD (heterogeneity) for relative effects, reported if `method="random"`.

• `D` The class effect for each class for a given dose-response parameter. Will be estimated by the model if specified in `class.effect`.

• `sd.D` The within-class SD for different agents within the same class. Will be estimated by the model if any dose-response parameter in `class.effect` is set to `"random"`.

• `beta` The absolute value of a given dose-response parameter across the whole network (does not vary by agent/class). Will be estimated by the model if dose-response parameters (`beta.1`, `beta.2`, `beta.3`, `beta.4`) are set to `"common"` or `"random"`.

• `sd` (with a suffix) - the between-study SD (heterogeneity) for absolute dose-response parameters, reported if `beta.1`, `beta.2`, `beta.3` or `beta.4` are set to `"random"`

• `totresdev` The residual deviance of the model

• `deviance` The deviance of the model

If there are errors in the JAGS model code then the object will be a list consisting of two elements - an error message from JAGS that can help with debugging and `model.arg`, a list of arguments provided to `mbnma.run()` which includes `jagscode`, the JAGS code for the model that can help users identify the source of the error.

## Dose-response parameters

• `"rel"` implies that relative effects should be pooled for this dose-response parameter separately for each agent in the network.

• `"common"` implies that all studies estimate the same true absolute effect (akin to a "fixed effects" meta-analysis) across the whole network

• `"random"` implies that all studies estimate a separate true absolute effect, but that each of these true effects vary randomly around a true mean effect. This approach allows for modelling of between-study heterogeneity.

• `numeric()` Assigned a numeric value. It indicates 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 value.

\insertAllCited

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76``` ```# Using the triptans data network <- mbnma.network(HF2PPITT) # Fit an Emax dose-response MBNMA with random treatment effects on Emax and ED50 emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random") # Fit an Emax dose-response MBNMA with common treatment effects on Emax and #a single common parameter estimated for ED50 emax <- mbnma.emax(network, emax="rel", ed50="common", method="common") ########## Class effects ########## # Generate a dataset with one class for active treatments and one for placebo class.df <- HF2PPITT class.df\$class <- ifelse(class.df\$agent=="placebo", "placebo", "active") netclass <- mbnma.network(class.df) # Fit an Emax function with common relative effects on Emax and ED50 and #a random class effect on ED50. emax <- mbnma.emax(netclass, emax="rel", ed50="rel", method="common", class.effect=list(ed50="random")) ####### Priors ####### # Obtain priors from an Emax function with random relative effects on Emax and ED50 emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random") print(emax\$model.arg\$priors) # Set new more informative prior distributions newpriors <- list(sd = "dnorm(0,0.5) T(0,)", inv.R = "dwish(Omega[,],100)") emax <- mbnma.emax(network, emax="rel", ed50="rel", method="random", priors=newpriors) ########## Sampler options ########## # Change the number of MCMC iterations, the number of chains, and the thin emax <- mbnma.emax(network, emax="rel", ed50="rel", n.iter=5000, n.thin=5, n.chains=4) # Calculate effective number of parameters via plugin method emax <- mbnma.emax(network, emax="rel", ed50="rel", pd="plugin") # Calculate effective number of parameters via Kullback-Leibler method emax <- mbnma.emax(network, emax="rel", ed50="rel", pd="pd.kl") ####### Examine MCMC diagnostics (using mcmcplots package) ####### # Density plots mcmcplots::denplot(emax) # Traceplots mcmcplots::traplot(emax) # Caterpillar plots mcmcplots::caterplot(emax, "d.emax") ########## Output ########### # Print R2jags output and summary print(emax) summary(emax) # Plot forest plot of results plot(emax) ```

MBNMAdose documentation built on Sept. 13, 2020, 5:08 p.m.