Learn R Programming

netmeta (version 3.7-0)

netpath: Path-based test of inconsistency in network meta-analysis

Description

Performs a path-based test of inconsistency for a specific comparison (treatment pair) in a network meta-analysis, based on the decomposition of the hat matrix into independent paths connecting the two nodes.

Usage

netpath(x, random = x$random, node1, node2, nchar.trts = x$nchar.trts)

# S3 method for netpath print( x, nchar.trts = x$nchar.trts, sep.trts = x$sep.trts, digits.Q = gs("digits.Q"), digits.pval.Q = gs("digits.pval.Q"), details.methods = gs("details"), legend = gs("legend"), ... )

Value

A list of class "netpath" containing the following elements:

results

Data frame containing results of the Q tests

A.matrix

Path-adjacency matrix

Sigma

Standardized matrix derived from the linearly independent paths

theta_p

Theta p

random, node1, node2

As defined above.

nchar.trts

As defined above.

call

Function call.

version

Version of R package netmeta used to create object.

Arguments

x

A netmeta object.

random

A logical indicating whether the path algorithm is based on a random effects model.

node1

First node.

node2

Second node.

nchar.trts

A numeric defining the minimum number of characters used to create unique treatment names (see Details).

sep.trts

A character used in comparison names as separator between treatment labels.

digits.Q

Minimal number of significant digits for heterogeneity statistics, see print.default.

digits.pval.Q

Minimal number of significant digits for p-value of heterogeneity tests, see print.default.

details.methods

A logical specifying whether details on statistical methods should be printed.

legend

A logical indicating whether a legend should be printed.

...

Additional arguments (igored).

Details

This function implements a path-based approach to assess inconsistency in a network meta-analysis (Tahmasebi et al., 2025). Starting from the hat matrix of the network (as calculated by hatmatrix with method = "Davies" and type = "full"), the direct and indirect evidence contributing to the comparison between node1 and node2 is decomposed into a set of independent evidence paths. A depth-first search algorithm is then used to identify these paths. A test statistic Q is calculated to test whether the estimates derived from these independent paths are consistent with each other. Under the null hypothesis of consistency, Q approximately follows a chi-squared distribution with degrees of freedom equal to the number of independent paths minus one.

Depending on the argument random, the network estimates are based on either the common effects model (random = FALSE) or the random effects model (random = TRUE).

In order to get more concise printouts, argument nchar.trts can be used to define the minimum number of characters for abbreviated treatment names (see abbreviate, argument minlength). R function treats is utilised internally to create abbreviated treatment names.

References

Tahmasebi NR, Davies AL, Papakonstantinou T, Rücker G, Nikolakopoulou A (2025): Path-based approach for detecting and assessing inconsistency in network meta-analysis: A novel method. arXiv, tools:::Rd_expr_doi("https://doi.org/10.48550/arXiv.2506.20364")

See Also

netmeta, heatplot.netpath

Examples

Run this code
if (FALSE) {
# Transform data from long arm-based to contrast-based format
#
pw <- pairwise(studlab = study, treat = treatment,
  n = n, mean = mean, sd = sd, data = Senn2013,
  varnames = c("MD", "seMD"))

# Conduct common effects network meta-analysis
#
nma <- netmeta(pw, random = FALSE, nchar.trts = 4)

np <- netpath(nma, node1 = "Placebo", node2 = "Sulfonylurea")
np
}

Run the code above in your browser using DataLab