Learn R Programming

MBNMAdose (version 0.4.1)

get.relative: Calculates relative effects between treatments in an MBNMA model

Description

Calculates relative effects between treatments in an MBNMA model

Usage

get.relative(mbnma, treatments = list(), eform = FALSE, lim = "cred")

Value

An array of length(treatments) x length(treatments) x nsims, where nsims

is the number of iterations monitored in mbnma. The array contains the individual MCMC values for each relative effect calculated between all treatments on the link scale specified in the mbnma model. The direction of effect is for the row-defined treatment versus the column-defined treatment.

Arguments

mbnma

An object of class("mbnma")

treatments

A list whose elements each represent different treatments. Treatment is defined as a combination of agent and dose. Only agents specified in mbnma can be included. Each element in treatments is named corresponding to the agent and contains a numeric vector of doses. Relative effects will be calculated between all treatments specified in treatments. If treatments is left empty then the maximum dose for all agents in mbnma will be used as the default.

eform

Whether outputted results should be presented in their exponential form (e.g. for models with log or logit link functions)

lim

Specifies calculation of either 95% credible intervals (lim="cred") or 95% prediction intervals (lim="pred").

Examples

Run this code
# Using the osteoarthritis data
network <- mbnma.network(osteopain)

expon <- mbnma.run(network, fun=dexp(), method="random")

# Calculate relative effects between:
# Celebrex 100mg/d, Celebrex 200mg/d, Tramadol 100mg/d
rel.eff <- get.relative(expon, treatments=list("Celebrex"=c(100,200), "Tramadol"=100))

Run the code above in your browser using DataLab