Learn R Programming

MBNMAdose (version 0.4.1)

mbnma.emax.hill: Run MBNMA model with an Emax dose-response function (with a Hill parameter) (DEPRECATED)

Description

FUNCTION IS NOW DEPRECATED - USE mbnma.run() DIRECTLY WITH OBJECTS OF class("dosefun")

Usage

mbnma.emax.hill(
  network,
  emax = "rel",
  ed50 = "rel",
  hill = "common",
  method = "common",
  class.effect = list(),
  UME = FALSE,
  cor = TRUE,
  omega = NULL,
  parameters.to.save = NULL,
  pd = "pd.kl",
  likelihood = NULL,
  link = NULL,
  priors = NULL,
  arg.params = NULL,
  ...
)

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:

Parameters(s)/Parameter PrefixInterpretation
<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.
sdThe between-study SD (heterogeneity) for relative effects, reported if method="random"
sd.<named dose-response parameter> (e.g. sd.emax)Between-study SD (heterogeneity) for absolute dose-response parameters specified as "random".
<named capitalized dose-response parameter> (e.g. EMAX)The class effect within each class for a given dose-response parameter. These will be estimated by the model if specified in class.effects for a given dose-response parameter.
sd.<named capitalized dose-response parameter> (e.g. sd.EMAX)The within-class SD for different agents within the same class. Will be estimated by the model if any dose-response parameter in class.effect is set to "random".
totresdevThe residual deviance of the model
devianceThe 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.

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 in ?mbnma.run).

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 in ?mbnma.run).

hill

Refers to the Hill parameter of the Emax dose-response function. Can take either "rel", "common", "random", or be assigned a numeric value (see details in ?mbnma.run).

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. Note that assuming class effects on some dose-response parameters may be unreasonable if the range of doses differ substantially across agents within a class.

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. This is automatically set to FALSE if class effects are modelled or if multiple dose-response functions are fitted.

omega

A scale matrix for the inverse-Wishart prior for the covariance matrix used to model the correlation between dose-response parameters (see Details for dose-response functions). omega must be a symmetric positive definite matrix with dimensions equal to the number of dose-response parameters modelled using relative effects ("rel"). If left as NULL (the default) a diagonal matrix with elements equal to 1 is used.

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 spiegelhalter2002MBNMAdose. 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 plummer2008MBNMAdose. This will require running the model for additional iterations but is a more robust calculation for the effective number of parameters in non-linear models.

  • popt calculates pD using an optimism adjustment which allows for calculation of the penalized expected deviance plummer2008MBNMAdose.

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"), be assigned the value "identity" for an identity link function, or be assigned the value "smd" for modelling Standardised Mean Differences using an identity link function. If left as NULL the link function will be automatically assigned based on the likelihood.

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 jagsmanual;textualMBNMAdose).

arg.params

Deprecated from version 0.4.0 onwards. Assign run and wrapper parameters

...

Arguments to be sent to R2jags.

Dose-response parameter arguments

ArgumentModel specification
"rel"Implies that relative effects should be pooled for this dose-response parameter separately for each agent in the network.
"common"Implies that all agents share the same common effect for this dose-response parameter.
"random"Implies that all agents share a similar (exchangeable) effect for this dose-response parameter. This approach allows for modelling of variability between agents.
numeric()Assigned a numeric value, indicating that this dose-response parameter should not be estimated from the data but should be assigned the numeric value determined by the user. This can be useful for fixing specific dose-response parameters (e.g. Hill parameters in Emax functions) to a single value.

Details

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

References

Examples

Run this code
# \donttest{
# Using the triptans data
tripnet <- mbnma.network(triptans)

# Fit an Emax (with Hill parameter) dose-response MBNMA with random treatment
#effects on Emax, ED50 and Hill
emax.hill <- mbnma.emax.hill(tripnet, emax="rel", ed50="rel", hill="rel",
                 method="random")

# Fit an Emax (with Hill parameter) dose-response MBNMA with common treatment
#effects on Emax, a single random parameter estimated for ED50
#and a single common parameter estimated for Hill
emax.hill <- mbnma.emax.hill(tripnet, emax="rel", ed50="random", hill="common",
                 method="common")

# Assign a specific numerical value for Hill parameter
emax.hill <- mbnma.emax.hill(tripnet, emax="rel", ed50="rel", hill=5)


# For further examples see ?mbnma.run
# }

Run the code above in your browser using DataLab