nma_thresh: Calculate thresholds and invariant intervals

Description Usage Arguments Details Value Model details Decision rules See Also Examples

View source: R/nma_thresh.R

Description

This function calculates decision-invariant bias-adjustment thresholds and intervals for Bayesian network meta-analysis, as described by Phillippo et al. (2018). Thresholds are derived from the joint posterior, and reflect the amount of change to a data point before the treatment decision changes. Calculation is achieved using fast matrix operations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
nma_thresh(
  mean.dk,
  lhood,
  post,
  nmatype = "fixed",
  X = NULL,
  mu.design = NULL,
  delta.design = NULL,
  opt.max = TRUE,
  trt.rank = 1,
  trt.code = NULL,
  trt.sub = NULL,
  mcid = 0,
  mcid.type = "decision"
)

Arguments

mean.dk

Posterior means of basic treatment parameters d_k.

lhood

Likelihood (data) covariance matrix.

post

Posterior covariance matrix (see details).

nmatype

Character string, giving the type of NMA performed. One of "fixed" (fixed effects, the default) or "random" (random effects). May be abbreviated.

X

[FE models only] Design matrix for basic treatment parameters.

mu.design

[RE models only] Design matrix for any extra parameters. Defaults to NULL (no extra parameters).

delta.design

[RE models only] Design matrix for delta, defaults to the N x N identity matrix.

opt.max

Should the optimal decision be the maximal treatment effect (TRUE, default) or the minimum (FALSE).

trt.rank

Rank of the treatment to derive thresholds for. Defaults to 1, thresholds for the optimum treatment.

trt.code

Treatment codings of the reference treatment and in the parameter vector d_k. Use if treatments re-labelled or re-ordered. Default is equivalent to 1:K.

trt.sub

Only look at thresholds in this subset of treatments in trt.code, e.g. if some are excluded from the ranking. Default is equivalent to 1:K.

mcid

Minimal clinically important difference for the decision (when mcid.type = 'decision') or for changing the decision (when mcid.type = 'change'). Defaults to 0, use the maximal efficacy decision rule.

mcid.type

Default 'decision', the decision rule is based on MCID (see details). Otherwise 'change', use the maximum efficacy rule, but only consider changing the decision when the alternative treatment becomes more effective than the base case by mcid or more.

Details

This function provides bias-adjustment threshold analysis for both fixed and random effects NMA models, as described by Phillippo et al. (2018). Parameters mean.dk, lhood, and post are always required, however there are differences in the specification of post and other required parameters and between the fixed and random effects cases:

FE models

The design matrix X for basic treatment parameters is required. The posterior covariance matrix specified in post should only refer to the basic treatment parameters.

RE models

The design matrix mu.design for additional parameters (e.g. covariates) is required, as is the design matrix delta.design for random effects terms. The posterior covariance matrix specified in post should refer to the basic treatment parameters, RE terms, and additional parameters in that order; i.e. post should be the posterior covariance matrix of the vector (d^T, δ^T, μ^T)^T.

Value

An object of class thresh.

Model details

The FE NMA model

The fixed effects NMA model is assumed to be of the form

Prior:

d ~ N(d_0, Σ_d)

Likelihood:

y|d ~ N(δ, V)

FE model:

δ = Xd + Mμ

The additional parameters μ may be given any sensible prior; they do not affect the threshold analysis in any way.

The RE NMA model

The random effects NMA model is assumed to be of the form

Priors:

d ~ N(d_0, Σ_d), μ ~ N(μ_0, Σ_μ)

Likelihood:

y|d,μ,τ^2 ~ N(Lδ + Mμ, V)

RE model:

δ ~ N(Xd, τ^2)

The between-study heterogeneity parameter τ^2 may be given any sensible prior. In the RE case, the threshold derivations make the approximation that τ^2 is fixed and known.

Decision rules

The default decision rule is maximal efficacy; the optimal treatment is k* = argmax(E(d_k)).

When ε = mcid is greater than zero and mcid.type = 'decision', the decision rule is no longer for a single best treatment, but is based on minimal clinically important difference. A treatment is in the optimal set if E(d_k) ≥ ε and max E(d_a) - E(d_k) ≤ ε.

When mcid.type = 'change', the maximal efficacy rule is used, but thresholds are found for when a new treatment is better than the base-case optimal by at least mcid.

See Also

recon_vcov, thresh_forest, thresh-class.

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
# Please see the vignette "Examples" for worked examples including use of
# this function, including more information on the brief code below.

vignette("Examples", package = "nmathresh")

### Contrast level thresholds for Thrombolytic treatments NMA
K <- 6   # Number of treatments

# Contrast design matrix is
X <- matrix(ncol = K-1, byrow = TRUE,
            c(1, 0, 0, 0, 0,
              0, 1, 0, 0, 0,
              0, 0, 1, 0, 0,
              0, 0, 0, 1, 0,
              0, -1, 1, 0, 0,
              0, -1, 0, 1, 0,
              0, -1, 0, 0, 1))

# Reconstruct hypothetical likelihood covariance matrix using NNLS
lik.cov <- recon_vcov(Thrombo.post.cov, prior.prec = .0001, X = X)

# Thresholds are then
thresh <- nma_thresh(mean.dk = Thrombo.post.summary$statistics[1:(K-1), "Mean"],
                     lhood = lik.cov,
                     post = Thrombo.post.cov,
                     nmatype = "fixed",
                     X = X,
                     opt.max = FALSE)

nmathresh documentation built on July 8, 2020, 5:17 p.m.