Title: | Detecting Outliers in Network Meta-Analysis |
Version: | 0.2.0 |
Date: | 2025-01-21 |
Depends: | R (≥ 3.0.0) |
Imports: | netmeta (≥ 0.9-7), meta (≥ 8.0-1), stats (≥ 3.4.3), parallel (≥ 3.4.1), MASS (≥ 7.3-47), reshape2 (≥ 1.4.3), ggplot2 (≥ 3.0.0), gridExtra (≥ 2.3) |
Author: | Maria Petropoulou |
Maintainer: | Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de> |
URL: | https://github.com/petropouloumaria/NMAoutlier |
Description: | A set of functions providing several outlier (i.e., studies with extreme findings) and influential detection measures and methodologies in network meta-analysis : - simple outlier and influential detection measures - outlier and influential detection measures by considering study deletion (shift the mean) - plots for outlier and influential detection measures - Q-Q plot for network meta-analysis - Forward Search algorithm in network meta-analysis. - forward plots to monitor statistics in each step of the forward search algorithm - forward plots for summary estimates and their confidence intervals in each step of forward search algorithm. |
License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
Encoding: | UTF-8 |
RoxygenNote: | 7.3.2 |
NeedsCompilation: | no |
Packaged: | 2025-02-10 11:05:59 UTC; petropou_admin |
Repository: | CRAN |
Date/Publication: | 2025-02-10 12:50:09 UTC |
NMAoutlier: Brief overview of measures and methodologies for detection of outlying and influential studies in network meta-analysis.
Description
R package NMAoutlier provides methods and tools to detect outlier and influential studies in network meta-analysis.
Details
R package NMAoutlier is a tool to detect outliers (studies with extreme results) and influential studies in network meta-analysis (Petropoulou, 2020). The package can calculate: simple outlier and influential measures; outlier and influential measures considered study deletion (shift the mean); the outlier detection methodology with Forward Search (FS) algorithm (Petropoulou et al., 2021). All proposed outlier and influential detection methods were fitted the frequentist NMA model by graph theory introduced by Rücker (2012) and implemented inR package netmeta.
The NMAoutlier package implements the following methods described in Petropoulou (2020).
-
Simple outlier and influential detection measures (function
NMAoutlier.measures
):raw residuals,
standardized residuals,
studentized residuals,
Mahalanobis distance,
leverage;
-
Outlier and influential detection measures considered study deletion (shift the mean) (function
NMAoutlier.measures
):raw deleted residuals,
standardized deleted residuals,
studentized deleted residuals,
Cook's distance,
COVRATIO,
weight leave one out,
leverage leave one out,
heterogeneity leave one out,
R heterogeneity,
R Qtotal,
R Qheterogeneity,
R Qinconsistency,
DFBETAS;
Plots of the several outlier and influential detection (simple and deletion) measures (function (
measplot
));Q-Q plot for network meta-analysis (function
Qnetplot
);-
Forward Search algorithm in network meta-analysis (function (
NMAoutlier
)) based on Petropoulou et al. (2021); forward plots (
fwdplot
) with monitoring statistics in each step of the FS algorithm:P-scores (Rücker & Schwarzer, 2015),
z-values for difference of direct and indirect evidence with back-calculation method (König et al., 2013; Dias et al., 2010),
standardized residuals,
heterogeneity variance estimator,
Cook's distance,
ratio of variances,
Q statistics (Krahn et al., 2013);
forward plots (
fwdplotest
) for summary treatment estimates in each iteration of the FS algorithm (Petropoulou et al., 2021).
Type help(package = "NMAoutlier")
for a listing of R functions
available in NMAoutlier.
Type citation("NMAoutlier")
on how to cite NMAoutlier
in publications.
To report problems and bugs, please send an email to Dr. Maria Petropoulou maria.petropoulou@uniklinik-freiburg.de.
The development version of NMAoutlier is available on GitHub https://github.com/petropouloumaria/NMAoutlier.
Author(s)
Petropoulou Maria maria.petropoulou@uniklinik-freiburg.de.
References
Dias S, Welton NJ, Caldwell DM, Ades AE (2010): Checking consistency in mixed treatment comparison meta-analysis. Statistics in Medicine, 29, 932–44
König J, Krahn U, Binder H (2013): Visualizing the flow of evidence in network meta-analysis and characterizing mixed treatment comparisons. Statistics in Medicine, 32, 5414–29
Krahn U, Binder H, König J (2013): A graphical tool for locating inconsistency in network meta-analyses. BMC Medical Research Methodology, 13, 35
Petropoulou M (2020): Exploring methodological challenges in network meta-analysis models and developing methodology for outlier detection. PhD dissertation
Petropoulou M, Salanti G, Rücker G, Schwarzer G, Moustaki I, Mavridis D (2021): A forward search algorithm for detecting extreme study effects in network meta-analysis. Statistics in Medicine
Rücker G (2012): Network meta-analysis, electrical networks and graph theory. Research Synthesis Methods, 3, 312–24
Rücker G, Schwarzer G (2015): Ranking treatments in frequentist network meta-analysis works without resampling methods. BMC Medical Research Methodology, 15, 58
See Also
Useful links:
Network meta-analysis comparing interventions for actinic keratosis
Description
Network meta-analysis dataset for comparing interventions for actinic keratosis.
Format
A data frame in contrast format with the following columns:
logOR | log odds ratio |
selogOR | standard error of log odds ratio |
id | study ID |
t1 | first treatment |
t2 | second treatment |
Details
The dataset compares the relative effects of nine interventions:
placebo / vehicle (including placebo-PDT) (treatment 1),
diclofenac 3 percent in 2.5 percent hyaluronic acid (DCF/HA) (treatment 2),
5-fluorouracil (5-FU) 0.5 percent (treatment 3),
imiquimod (IMI) 5 percent (treatment 4),
methyl aminolaevulinate (MAL)-PDT (treatment 5),
5-aminolaevulinic acid (ALA)-photodynamic therapy (PDT) (treatment 6),
5-fluorouracil (5-FU) 5.0 percent (treatment 7),
cryotherapy (treatment 8),
ingenol mebutate (IMB) 0.015-0.05 percent (treatment 9).
The outcome is the number of individuals with participant complete clearance or equivalent efficacy. These data are in contrast format with effect size the odds ratio (OR). The arm-level data were used in Gupta and Paquet (2013).
Source
Gupta AK, Paquet M (2013): Network meta-analysis of the outcome participant complete clearance in nonimmunosuppressed participants of eight interventions for actinic keratosis: a follow-up on a Cochrane review. British Journal of Dermatology, 169, 250–9
Examples
data(Gupta2013)
# Conduct forward search algorithm for the network of actinic keratosis
#
FSresult <- NMAoutlier(logOR, selogOR, t1, t2, id, data = Gupta2013, n_cores = 2)
# Plovide the forward plot for z-values from difference of direct and
# indirect evidence
#
fwdplot(FSresult, "nsplit")
# Provide forward plot for Q statistic
#
fwdplot(FSresult, "Q")
InitialSubset
Description
Choose an initial clean (i.e. likely outlier-free) subset of studies.
Usage
InitialSubset(
TE,
seTE,
treat1,
treat2,
studlab,
crit1,
studies,
P,
reference,
t1.label,
t2.label,
n_cores,
...
)
Arguments
TE |
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio). |
seTE |
Standard error of treatment estimate. |
treat1 |
Label/Number for first treatment. |
treat2 |
Label/Number for second treatment. |
studlab |
Study labels (important when multi arm studies are included). |
crit1 |
A character string indicating the criterion to be used for selecting the initial subset, this criterion could be the minimum of median absolute residuals ("R") or the maximum of median absolute likelihood contributions ("L"). Default value is "R". |
studies |
An optional vector specifying a subset of studies to be used. The default value is the number of studies. |
P |
An optional vector specifying the number of samples for the choice of the initial subset. |
reference |
Reference treatment group. |
t1.label |
numbers to treatment 1 IDs. |
t2.label |
numbers to treatment 2 IDs. |
n_cores |
the number of cores that the process is running using the parallel. |
Value
An initial clean subset of studies.
Residuals and log-likelihood contributions in multi-arm trials
Description
Computes the arithmetic mean of standardized and log-likelihood contributions in the case of multi-arm trials.
Usage
Multi(st.lab, ei, wr)
Arguments
st.lab |
studylab of set of studies |
ei |
standardized residuals for each comparison from a set of studies |
wr |
weigths of random effects model |
Value
the arithmetic mean of standardized and log-likelihood contributions.
Forward Search algorithm in network meta-analysis
Description
This function employs the Forward Search algorithm to detect outliers and influential studies fitted in network meta-analysis model from graph-theory. This is an outlying diagnostic tool to detect outliers and studies that are potential sources for heterogeneity and inconsistency in network meta-analysis.
Monitoring measures during the search are:
outlier detection measures (standardized residuals, Cook's distance, ratio of variance);
ranking measures (P-scores);
heterogeneity and inconsistency measures (Q statistics for overall heterogeneity / inconsistency, inconsistency by design-by-treatment interaction model, z-values for comparison between direct and indirect evidence by back-calculation method).
A description of the outlier detection methodology can be found in Petropoulou et al. (2021).
Usage
NMAoutlier(
TE,
seTE,
treat1,
treat2,
studlab,
data = NULL,
crit1 = "R",
crit2 = "R",
studies = NULL,
P = 100,
sm,
Isub = NULL,
reference = "",
small.values = "good",
n_cores = NULL,
...
)
Arguments
TE |
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio). This can also be a pairwise object (i.e. the result of pairwise function of netmeta package). In this case, the pairwise object should include the following: TE, seTE, treat1, treat2, studlab |
seTE |
Standard error of treatment estimate. |
treat1 |
Label/Number for first treatment. |
treat2 |
Label/Number for second treatment. |
studlab |
Study labels (important when multi arm studies are included). |
data |
A data frame containing the study information. |
crit1 |
A character string indicating the criterion to be used for selecting the initial subset, this criterion may be the minimum of median absolute residuals ("R") or the maximum of median absolute likelihood contributions ("L"). Default value is "R". |
crit2 |
A character string indicating the criterion to be used for selecting the study entered from non-basic set to basic set, this criterion may be the minimum of absolute residuals ("R") or the maximum of absolute likelihood contributions ("L"). Default value is "R". |
studies |
An optional vector specifying the number of the initial subset of studies. The default value is the maximum of the number of treatments and the 20 percent of the total number of studies. |
P |
An optional vector specifying the number of candidate
sample of studies (with length equal to |
sm |
A character string indicating underlying summary measure,
e.g., |
Isub |
A vector for the studies to be included in the initial subset (default: NULL, the initial subset not specified by the user). |
reference |
Reference treatment group. |
small.values |
A character string indicating if small values are considered beneficial (option:"good") or harmfull (option:"bad") on outcome. This is requirement for p-scores computation. The default value is considered benefial outcome ("good"). |
n_cores |
The number of cores that the process is running using the parallel (default: NULL, the process is running using all the available cores) |
... |
Additional arguments passed on to
|
Details
FS algorithm for network meta-analysis model from graph theory is described in Petropoulou et al. (2021).
Let n be the number of treatments and let m be the
number of pairwise treatment comparisons. If there are only
two-arm studies, m is equal to the number of studies. Let TE
and seTE be the vectors of observed effects and their standard
errors. Comparisons belonging to multi-arm studies are identified
by identical study labels (argument studlab
).
The FS algorithm is an outlier diagnostic iterative procedure. FS algorithm apart from three steps. It starts with a subset of studies and it gradually adds studies until all studies entered. After the search, statistical measures are monitored for sharp changes.
In more detail, the FS algorithm starts with an initial subset of
the dataset with size l. Let (argument P
)
(eg. P = 100) a large number of candidate subset of studies
with size l. The candidate subset that optimize the
criterion (argument crit1
) is taken as the initial subset
(considered ideally to be outlying-free). Criterion (crit1
)
to be used for selecting the initial subset, can be the minimum of
median absolute residuals "R"
or the maximum of median
absolute likelihood contributions "L"
. It is conventionally
refer this subset as basic set, whereas the remaining studies
constitute the non-basic set.
The FS algorithm gradually adds studies from the non-basic to the
basic subset based on how close the former studies are to the
hypothesized model fit in the basic set. A study from non-basic
set entered into the basic set if optimize the criterion (argument
crit2
). Criterion (crit2
) for selecting the study
from non-basic to basic set may be the minimum of median absolute
residuals "R"
or the maximum of median absolute likelihood
contributions "L"
. The algorithm order the studies
according to their closeness to the basic set by adding the study
that optimize the criterion from non-basic set to basic set.
The process is repeated until all studies are entered into the
basic set. The number of iterations of algorithm index is
equal to the total number of studies minus the number of studies
entered into the initial subset. Through the FS procedure,
parameter estimates (summary estmates, heterogeneity estimator) and
other statistics of interest (outlying measures, heterogeneity and
inconsistency measures, ranking measures) are monitored. In each
iteration, network meta-analysis model from graph theory (Rücker,
2012) is fitted (netmeta
function) with R package
netmeta.
Monitoring statistical measures for each FS iteration can be:
Outlying detection measures: Standardized residuals (arithmetic mean in case of multi-arm studies); Cook's statistic; Ratio of determinants of variance-covariance matrix
Ranking measures:
P-scores for ranking of treatments (Rücker G & Schwarzer G, 2015)
for each basic set with implementation of (netrank
function)
from R package netmeta.
Heterogeneity and inconsistency measures:
Overall heterogeneity / inconsistency Q statistic (Q
) This
is the design-based decomposition of Cochran Q as provided by Krahn
et al. (2013); Overall heterogeneity Q statistic (Q
);
Between-designs Q statistic (Q
), based on a random effects
model with square-root of between-study variance estimated embedded
in a full design-by-treatment interaction model. Implementation
with (decomp.design
function) from R package netmeta;
Z-values (Dias et al., 2010; König et al., 2013) for comparison
between direct and indirect evidence in
each iteration of forward search algorithm. By monitoring
difference of direct and indirect evidence, potential sources of
consistency can be detected with the implementation of
(netsplit
function) from R package netmeta for each
iteration of the search.
Value
An object of class NMAoutlier
; a list containing the
following components:
dat |
Matrix containing the data |
length.initial |
The number of studies that constitute the initial (outlying-clean) subset of studies. |
index |
The number of iterations of forward search algorithm. |
basic |
Studies entered into the basic set in each iteration of the search. At the first iteration, basic set constitute the studies that are included in the basic-initial subset. The number of studies in the first iteration is equal to length.initial. |
taub |
Heterogeneity estimator variance for basic set in each iteration of forward search algorithm. |
Qb |
Overall heterogeneity - inconsistency Q statistic ( |
Qhb |
Overall heterogeneity Q statistic ( |
Qib |
Overall inconsistency Q statistic ( |
estb |
Summary estimates for each treatment for the basic set in each iteration of forward search algorithm. |
lb |
Lower 95% confidence interval of summary estimates for the basic set in each iteration of forward search algorithm. |
ub |
Upper 95% confidence interval of summary estimates for the basic set in each iteration of forward search algorithm. |
Ratio |
Ratio of determinants ( |
cook_d |
Cook's statistic ( |
p.score |
P-score for ranking each treatment for the basic set in each iteration of forward search algorithm. |
dif |
Z-values for comparison between direct and indirect evidence for each iteration of forward search algorithm. Based on back-calculation method to derive indirect estimates from direct pairwise comparisons and network estimates. |
estand |
Standardized residuals for each study for the basic set in each iteration of forward search algorithm. |
call |
Function call |
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
References
Dias S, Welton NJ, Caldwell DM, Ades AE (2010): Checking consistency in mixed treatment comparison meta-analysis. Statistics in Medicine, 29, 932–44
König J, Krahn U, Binder H (2013): Visualizing the flow of evidence in network meta-analysis and characterizing mixed treatment comparisons. Statistics in Medicine, 32, 5414–29
Krahn U, Binder H, König J (2013): A graphical tool for locating inconsistency in network meta-analyses. BMC Medical Research Methodology, 13, 35
Petropoulou M, Salanti G, Rücker G, Schwarzer G, Moustaki I, Mavridis D (2021): A forward search algorithm for detecting extreme study effects in network meta-analysis. Statistics in Medicine
Rücker G (2012): Network meta-analysis, electrical networks and graph theory. Research Synthesis Methods, 3, 312–24
Rücker G, Schwarzer G (2015): Ranking treatments in frequentist network meta-analysis works without resampling methods. BMC Medical Research Methodology, 15, 58
Examples
## Not run:
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3),
list(n1, n2, n3),
data = study912,
sm = "OR")
# Forward search algorithm
#
FSresult <- NMAoutlier(p1, P = 1, small.values = "bad", n_cores = 2)
FSresult
data(smokingcessation)
# Transform data from arm-based to contrast-based format
# We use 'sm' argument for odds ratios.
# We use function pairwise from netmeta package
#
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3),
list(n1, n2, n3),
data = smokingcessation,
sm = "OR")
# Forward search algorithm
#
FSresult1 <- NMAoutlier(p1, small.values = "bad")
# Basic set for each iteration of forward search algorithm
#
FSresult1$basic
# Forward search algorithm using the criteria (crit1, crit2)
# with the maximum of absolute likelihood contributions ("L")
#
FSresult2 <- NMAoutlier(p1, crit1 = "L", crit2 = "L",
small.values = "bad")
FSresult2
## End(Not run)
Outlier and influential detection measures in network meta-analysis.
Description
This function calculates several (simple or/and deletion) measures for detection of outliers and influential studies in network meta-analysis.
Outlier and influential detection measures are:
-
Simple outlier and influential measures for each study (Raw residuals, Standardized residuals, Studentized residuals, Mahalanobis distance, leverage).
Outlier and influential deletion measures for each study (Shift the mean) (Raw deleted residuals, Standardized deleted residuals, Studentized deleted residuals, Cook distance between the treatment estimates for study j and treatment estimates when study j is removed; Ratio of determinants of variance-covariance matrix of treatment estimates for study j to treatment estimates when study j is removed; weight leave one out;leverage leave one out; heterogeneity estimator leave one out; R statistic for heterogeneity; R statistic for Q (
Qtotal
), R statistic for heterogeneity Q (Qhet
), R statistic for Qinconsistency (Qinc
), DFbetas.)
Usage
NMAoutlier.measures(
TE,
seTE,
treat1,
treat2,
studlab,
data = NULL,
sm,
reference = "",
measure = "simple",
...
)
Arguments
TE |
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio). |
seTE |
Standard error of treatment estimate. |
treat1 |
Label/Number for first treatment. |
treat2 |
Label/Number for second treatment. |
studlab |
Study labels (important when multi arm studies are included). |
data |
A data frame containing the study information. |
sm |
A character string indicating underlying summary measure,
e.g., |
reference |
Reference treatment group. |
measure |
Outlier and influential detection measures, simple measures (default: "simple") or outlier and influential detection measures considered study deletion (measure = "deletion"). |
... |
Additional arguments passed on to
|
Details
Outlier and influential detection measures (simple or deletion) for network meta-analysis.
Network meta-analysis from graph-theory [Rücker, 2012] is fitted
with (netmeta
function) of R package netmeta [Rücker et al., 2015].
A description of the outlier and influential detection measures in the context of network meta-analysis can be found in Petropoulou (2020).
Let n be the number of treatments in a network and let
m be the number of pairwise treatment comparisons. If there
are only two-arm studies, m is the number of studies. Let
TE
and seTE
be the vectors of observed effects and their standard
errors. Comparisons belonging to multi-arm studies are identified
by identical study labels (argument studlab
).
This function calculates outlier and influential detection measures for each study.
Simple outlier and influential measures (measure
= "simple") are:
Raw residuals, Standardized residuals, Studentized residuals, Mahalanobis distance
and leverage for each study.
For deletion outlier and influential measures (measure
= "deletion"):
Standardized deleted residual; Studentized deleted residual; Cook distance between the treatment estimates for study j
and treatment estimates when study j is removed;
Ratio of determinants of variance-covariance matrix of treatment estimates for study j to treatment estimates when study j is removed;
Weight leave one out;leverage leave one out; heterogeneity estimator leave one out;
R statistic for heterogeneity; R statistis for estimates; R statistic for Q (Qtotal
), R statistic for heterogeneity Q
(Qhet
), R statistic for Qinconsistency (Qinc
), DFbetas.
Value
An object of class NMAoutlier.measures
;
with a list containing the following components when choosing simple measures:
dat |
Matrix containing the data |
eraw |
Raw residual for each study included in the network. |
estand |
Standardized residual for each study included in the network. |
estud |
Studentized residual for each study included in the network. |
Mah |
Mahalanobis distance for each pairwise comparison. |
Mah.distance |
Mahalanobis distance for each study included in the network. |
leverage |
Leverage for each study included in the network. |
measure |
type of measure used. |
call |
Function call |
a list containing the following components,when choosing deletion measures:
dat |
Matrix containing the data |
eraw.deleted |
Raw deleted residual for each study included in the network. |
estand.deleted |
Standardized deleted residual for each study included in the network. |
estud.deleted |
Studentized deleted residual for each study included in the network. |
Cooks.distance |
Cook distance between the treatment estimates for study j and treatment estimates when study j is removed |
Covratio |
Ratio of determinants of variance-covariance matrix of treatment estimates for study j to treatment estimates when study j is removed. |
w.leaveoneout |
Weight leave one out. |
H.leaveoneout |
Leverage leave one out. |
heterog.leaveoneout |
Heterogeneity estimator leave one out. |
Rheterogeneity |
R statistic for heterogeneity. |
Restimates |
R statistis for estimates. |
RQtotal |
R statistic for Q ( |
RQhet |
R statistic for heterogeneity Q ( |
RQinc |
R statistic for Qinconsistency ( |
DFbetas |
DFbetas. |
measure |
type of measure used. |
call |
Function call |
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
References
Rücker G (2012): Network meta-analysis, electrical networks and graph theory. Research Synthesis Methods, 3, 312–24
Rücker G, Schwarzer G (2015): Ranking treatments in frequentist network meta-analysis works without resampling methods. BMC Medical Research Methodology, 15, 58
Petropoulou M (2020): Exploring methodological challenges in network meta-analysis models and developing methodology for outlier detection. PhD dissertation
Examples
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = study912, sm = "OR")
# Outlier and influential detection measures for studies 9, 10, 11, 12
meas <- NMAoutlier.measures(p1)
# Standardized residual for each study included in the network
meas$estand
## Not run:
# Outlier and influential deletion measures for studies 9, 10, 11, 12.
delete <- NMAoutlier.measures(p1, measure = "deletion")
# Standardized deleted residual for studies 9, 10, 11, 12.
delete$estand.deleted
data(smokingcessation)
# Transform data from arm-based to contrast-based format
# We use 'sm' argument for odds ratios.
# We use function pairwise from netmeta package
#
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Outlier and influential detection measures for each study in the network
meas <- NMAoutlier.measures(p1, measure = "simple")
# Mahalanobis distance for each study included in the network
meas$Mah
## End(Not run)
Q-Q plot for network meta-analysis (Q-Q netplot).
Description
This function generates the Q-Q plot for network meta-analyisis model.
Usage
Qnetplot(data)
Arguments
data |
object of class NMAoutlier.measures (mandatory). |
Details
Plot of Q-squared Mahalanobis distance for each study included in the network meta-analysis. Vertical axis provides the Q-squared Mahalanobis distance for each i study included in the network meta-analysis. Horizontal axis provides Q estimated quantiles (theoretical quantiles from the normal distribution). A reference line is fitted from the cartesian points of the two measures. The Q-Q plot can visualize studies that are away from the reference line (potiential outliers).
Q-Q plot for network meta-analysis has been introduced by Petropoulou (2020).
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
References
Petropoulou M (2020): Exploring methodological challenges in network meta-analysis models and developing methodology for outlier detection. PhD dissertation
Examples
library("netmeta")
data(smokingcessation)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Outlier and influential detection measures
measures <- NMAoutlier.measures(p1)
# Mahalanobis distance values for each study in the network
measures$Mah
# Q-Q netplot for the network of smoking cessation dataset
Qnetplot(measures)
Network meta-analysis comparing the effects after Laparoscopic Heller myotomy.
Description
Network meta-analysis dataset comparing the effects after Laparoscopic Heller myotomy.
Format
A data frame in contrast format with the following columns:
logOR | log odds ratio |
selogOR | standard error of log odds ratio |
id | study ID |
t1 | first treatment |
t2 | second treatment |
Details
The dataset compares the effects after Laparoscopic Heller myotomy. The outcome is the number of individuals with successful rates at 12 months. These data are in contrast format with effect size odds ratio (OR) and its standard error. Arm-level data can be found in Schoenberg et al. (2013).
Source
Schoenberg MB, Marx S, Kersten JF, Rösch T, Belle S, Kähler G, Vassiliou MC, Lüth S, von Renteln D (2013): Laparoscopic Heller myotomy versus endoscopic balloon dilatation for the treatment of achalasia: a network meta-analysis. Annals of Surgery, 258, 943–52
Examples
data(Schoenberg2013)
# Conduct forward search algorithm for the network of Laparoscopic
# Heller myotomy
#
FSresult <- NMAoutlier(logOR, selogOR, t1, t2, id, data = Schoenberg2013, n_cores = 2)
# Draw forward plot for z-values from difference of direct and
# indirect evidence
#
fwdplot(FSresult, "nsplit")
Forward plot(s) to monitor selected statistic(s)/method(s)
Description
This function generates forward plot(s) to monitor selected
statistic(s) and/or method(s). The function creates a plot of the
selected monitoring measure throughout the iterations of the Forward Search
algorithm. Candidate statistics to be monitored can be: P-score;
z-values by back-calculation method to derive indirect estimates
from direct pairwise comparisons and network estimates;
standardized residuals; heterogeneity variance estimator; Cook's
distance; ratio of variances; Q statistics (Overall heterogeneity /
inconsistency Q statistic (Q
), overall heterogeneity Q
statistic (Q
), between-designs Q statistic (Q
), based
on a random effects design-by-treatment interaction model).
Usage
fwdplot(x, stat, select.st = NULL)
Arguments
x |
an object of class NMAoutlier (mandatory). |
stat |
statistical measure to be monitored in forward plot(s) (mandatory), available choices are: "pscore", "nsplit", "estand", "heterog", "cook", "ratio", or "Q" (can be abbreviated). |
select.st |
selected statistic (pscore/nsplit/estand) for selected treatment(s)/comparison(s)/study |
Details
Plot of statistical measures for each iteration of search. Vertical axis provides the FS iterations. Horizontal axis provides the values of the monitoring statistical measure.
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
Examples
## Not run:
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = study912, sm = "OR")
# Forward search algorithm
#
FSresult <- NMAoutlier(p1, P = 1, small.values = "bad", n_cores = 2)
# forward plot for Cook's distance
fwdplot(FSresult, "cook")
data(smokingcessation)
# Transform data from arm-based to contrast-based format
# Use 'sm' argument for odds ratios.
# Use function pairwise from netmeta package
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# Forward Search algorithm
FSresult <- NMAoutlier(p1, small.values = "bad")
FSresult
# forward plot for Cook's distance
fwdplot(FSresult, "cook")
# forward plot for ratio of variances
fwdplot(FSresult, "ratio")
# forward plot for heterogeneity estimator
fwdplot(FSresult, "heterog")
# forward plot for Q statistics
fwdplot(FSresult, "Q")
# forward plot for P-scores
fwdplot(FSresult, "pscore")
# forward plot monitoring P-scores for treatment A
fwdplot(FSresult,"pscore", "A")
# forward plot for z-values of disagreement of direct and indirect evidence
fwdplot(FSresult, "nsplit")
# forward plot for z-values of disagreement of direct and indirect evidence
# monitoring treatment comparison A versus B
fwdplot(FSresult, "nsplit", "A:B")
# forward plot for standardized residual for study 4
fwdplot(FSresult, "estand", 4)
## End(Not run)
Forward plots of summary treatment estimates
Description
Forward plots of summary treatment estimates with their 95 percent confidence intervals.
Usage
fwdplotest(x)
Arguments
x |
object of class NMAoutlier (mandatory). |
Details
Plot of summary treatment estimates and their confidence intervals for each FS iteration. Vertical axis provides the FS iterations. Horizontal axis provides summary treatment estimates.
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
Examples
## Not run:
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = study912, sm = "OR")
# Forward search algorithm
#
FSresult <- NMAoutlier(p1, P = 1, small.values = "bad", n_cores = 2)
# Forward plot for summary treatment estimates and their confidence
# intervals
#
fwdplotest(FSresult)
data(smokingcessation)
# Transform data from arm-based format to contrast-based format
# We use 'sm' argument for odds ratios.
# We use function pairwise from netmeta package
#
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = smokingcessation, sm = "OR")
# forward search algorithm
FSresult <- NMAoutlier(p1, small.values = "bad")
# Forward plot for summary treatment estimates
# and their confidence intervals
fwdplotest(FSresult)
## End(Not run)
Plot(s) to monitor selected outlier and influential measure(s).
Description
This function generates plot(s) of the selected outlier detection measure(s) for each study included in the network. Candidate statistics to be monitored are: Standardized residual; Studentized residual; Mahalanobis distance and leverage.
The function also generates plot(s) of the selected outlier
detection measure(s) considering a deletion of each study included
in the network (Shift the mean measures). Candidate statistics to
be monitored are: Standardized deleted residual; Studentized
deleted residual; Cook distance between the treatment estimates for
study j and treatment estimates when study j is removed; Ratio of
determinants of variance-covariance matrix of treatment estimates
for study j to treatment estimates when study j is removed; weight
leave one out;leverage leave one out; heterogeneity estimator leave
one out; R statistic for heterogeneity; R statistic for Q
(Qtotal
), R statistic for heterogeneity Q (Qhet
), R
statistic for Qinconsistency (Qinc
), DFbetas.
Usage
measplot(object, stat, measure = "simple")
Arguments
object |
an object of class NMAoutlier.measures (mandatory). |
stat |
selected statistical outlier and influential detection measure (mandatory), For simply outlier and influential measures available choices are: ("estand"/ "estud"/ "mah"/ "leverage"). For outlier and influential deletion measures available choices are: ("estand.deleted", "estud.deleted", "leverage.leaveoneout", "weight.leaveoneout", "heterog.leaveoneout", "covratio", "cook", "rheterogeneity", "restimates", "rqhet", "rqinc", "rqtotal", "dfbetas") |
measure |
Outlier and influential detection measures. Simple measures (default: "simple") and measures considered study deletion (measure = "deletion"). |
Details
Plot of outlier and influential (simple or/and deletion) detection measures for each study included in the network. Vertical axis provides each study included in the network (or the study deleted for outlier deletion measures). Horizontal axis provides a monitoring outlier and influential detection measure.
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
Examples
library("netmeta")
data(smokingcessation)
smokingcessation$id <- 1:nrow(smokingcessation)
study912 <- subset(smokingcessation, id %in% 9:12)
p1 <- pairwise(list(treat1, treat2, treat3),
list(event1, event2, event3), list(n1, n2, n3),
data = study912, sm = "OR")
# Outlier and influential detection measures for each study in the
# network
measures <- NMAoutlier.measures(p1)
# plot of standardized residuals for each study
measplot(measures, "estand")
# plot of Mahalanobis distance values for each study
measplot(measures, "mah")
# plot of leverage values for each study
measplot(measures, "leverage")
## Not run:
# Outlier detection measures considered deletion each time of an
# included study
deletion <- NMAoutlier.measures(p1, measure = "deletion")
# plot for R statistic for heterogeneity estimator
measplot(deletion, "rheterogeneity", measure = "deletion")
# plot for R statistic for Qinconsistency
measplot(deletion, "rqinc", measure = "deletion")
# plot of COVRATIO values when considering deletion for each study
measplot(deletion, "covratio", measure = "deletion")
## End(Not run)
mult
Description
Computes the arithmetic mean of standardized residuals in case of multi-arm trials.
Usage
mult(studlab, ind.bs, standres, model)
Arguments
studlab |
Study labels (important when multi arm studies are included). |
ind.bs |
indices of basic set. |
standres |
standardized residuals of each pairwise comparison. |
model |
model assigned from netmeta |
Value
standardized residuals and arithmetic mean of standardized residuals in case of multi-arm trials.
Network meta-analysis for a set of studies
Description
Conduct network meta-analysis (Rücker model) for a set of studies.
Usage
netmet(
TE,
seTE,
treat1,
treat2,
studlab,
ind.bs,
reference,
small.values,
names.treat,
...
)
Arguments
TE |
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio). |
seTE |
Standard error of treatment estimate. |
treat1 |
Label/Number for first treatment. |
treat2 |
Label/Number for second treatment. |
studlab |
Study labels (important when multi arm studies are included). |
ind.bs |
indices of studies in basic set |
reference |
Reference treatment group |
small.values |
small.values for P-score. A character string indicating if small values are considered bad ("bad") or good ("good"). |
names.treat |
names of treatments |
... |
Additional arguments passed on to
|
Value
results and statistics from network meta-analysis.
Network meta-analysis for the whole dataset.
Description
Conduct network meta-analysis (Rücker model) for the whole dataset.
Usage
nma(TE, seTE, treat1, treat2, studlab, reference, names.treat, ...)
Arguments
TE |
Estimate of treatment effect, i.e. difference between first and second treatment (e.g. log odds ratio, mean difference, or log hazard ratio). |
seTE |
Standard error of treatment estimate. |
treat1 |
Label/Number for first treatment. |
treat2 |
Label/Number for second treatment. |
studlab |
Study labels (important when multi arm studies are included). |
reference |
Reference treatment group |
names.treat |
names of treatments |
Value
Within-study standard error, design matrix, summary estimate, heterogeneity from network meta-analysis.
Helper function to create the plots of summary estimates and their intervals for FS algorithm.
Description
Helper function to create the plots of summary estimates and their intervals for FS algorithm.
Usage
plotesthelper(x, lower, upper, estimate, xdata, xtitle)
Arguments
x |
object of class NMAoutlier(mandatory). |
lower |
lower bundary of confidence interval of summary estimate. |
upper |
upper bundary of confidence interval of summary estimate. |
estimate |
summary estimate. |
xdata |
data. |
xtitle |
title for plots in x-axis. |
Details
Plot of summary estimate and its confidence interval for each treatment for FS and algorithm. Vertical axis provides the iterations of FS algorithm. Horizontal axis provides a summary estimate of a treatment.
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
Helper function to create the plots for FS algorithm.
Description
Helper function to create the plots for FS algorithm.
Usage
plothelper(x, stat, select.st)
Arguments
x |
object of class NMAoutlier (mandatory). |
stat |
The monitored statistic to generate the plot. |
select.st |
selected statistic (pscore/nsplit/estand) for selected treatment(s)/comparison(s)/study |
Details
Plot of several monitoring measures for FS algorithm. Vertical axis provides the iterations of FS algorithm. Horizontal axis provides a monitoring statistical measure in the methodology.
Author(s)
Maria Petropoulou <maria.petropoulou@uniklinik-freiburg.de>
Statistical measure in multi-arm studies
Description
Computes the arithmetic mean of a statistical measure for the pairwise comparisons to study level data (this can be done in the case of multi-arm trials).
Usage
res_multi(st.lab, ei)
Arguments
st.lab |
studylab of set of studies. |
ei |
statistical measure for each pairwise comparison of studies. |
Value
the arithmetic mean of statistical measure.