Scatter plot or biplot showing partially order of treatment ranks
This function generates a scatter plot or biplot of P-scores with an overlay describing partial order of treatment ranks.
## S3 method for class 'netposet' plot( x, plottype = "scatter", pooled = ifelse(x$comb.random, "random", "fixed"), dim = "2d", sel.x = 1, sel.y = 2, sel.z = 3, cex = 1, col = "black", cex.text = cex, col.text = col, adj.x = 0, adj.y = 1, offset.x = 0.005, offset.y = -0.005, pch = NULL, cex.points = cex, col.points = col, col.lines = "black", lty.lines = 1, lwd.lines = 1, arrows = FALSE, length = 0.05, grid = TRUE, col.grid = "gray", lty.grid = 2, lwd.grid = 1, ... )
x |
An object of class |
plottype |
A character string indicating whether a scatter
plot or biplot should be produced, either |
pooled |
A character string indicating whether scatter plot
should be drawn for fixed ( |
dim |
A character string indicating whether a 2- or
3-dimensional plot should be produced, either |
sel.x |
A numeric specifying number of outcome to use for the x-axis in a scatterplot (argument is not considered for a biplot). |
sel.y |
A numeric specifying number of outcome to use for the y-axis in a scatterplot (argument is not considered for a biplot). |
sel.z |
A numeric specifying number of outcome to use for the z-axis in a scatterplot (argument is not considered for a biplot). |
cex |
The magnification to be used for treatment labels and points. |
col |
Colour(s) of treatment labels and points. |
cex.text |
The magnification to be used for treatment labels. |
col.text |
Colour(s) of treatment labels. |
adj.x |
Value(s) in [0, 1] to specify adjustment of treatment
labels on x-axis (only considered in 2-D plots); see
|
adj.y |
Value(s) in [0, 1] to specify adjustment of treatment
labels on y-axis (only considered in 2-D plots); see
|
offset.x |
Offset(s) of treatment labels on x-axis (only considered in 2-D plots). |
offset.y |
Offset(s) of treatment labels on y-axis (only considered in 2-D plots). |
pch |
Plot symbol(s) for points; no points printed if equal to
|
cex.points |
Magnification(s) to be used for points. |
col.points |
Colour(s) of points. |
col.lines |
Line colour. |
lty.lines |
Line type. |
lwd.lines |
Line width. |
arrows |
A logical indicating whether arrows should be printed (only considered in 2-D plots). |
length |
Length of arrows; see |
grid |
A logical indicating whether grid lines should be added to plot. |
col.grid |
Colour of grid lines. |
lty.grid |
Line type of grid lines. |
lwd.grid |
Line width of grid lines. |
... |
Additional graphical arguments. |
By default (arguments plottype = "scatter"
and dim =
"2d"
), a scatter plot is created showing P-scores (see
netrank
) for the first two outcomes considered in the
generation of a partially ordered set of treatment ranks (using
netposet
). In addition to the P-scores, the partially
order of treatment ranks is shown as lines connecting treatments
which is analogous to a Hasse diagram. If argument dim =
"3d"
), a 3-D scatter plot is generated showing P-scores for the
first three outcomes.
To overcome the restriction of two or three dimension, a biplot
(Gabriel, 1971) can be generated using argument plottype =
"biplot"
. This is essentially a scatter plot using the first two
(dim = "2d"
) or three (dim = "3d"
) components in a
principal components analysis (using
prcomp
). Note, if only two / three outcomes
are considered in a netposet
object, a 2-D / 3-D scatter
plot is generated instead of a biplot as a principal component
analysis is superfluous in such a situation.
Arguments sel.x
and sel.y
can be used to select
different outcomes to show on x- and y-axis in a 2-D scatter plot;
argument sel.z
can be used accordingly in a 3-D scatter
plot. These arguments are ignored for a biplot.
Note, in order to generate 3-D plots (argument dim = "3d"
),
R package rgl is necessary. Note, under macOS the X.Org X
Window System must be available (see
https://www.xquartz.org).
Gerta Rücker ruecker@imbi.uni-freiburg.de, Guido Schwarzer sc@imbi.uni-freiburg.de
Carlsen L, Bruggemann R (2014): Partial order methodology: a valuable tool in chemometrics. Journal of Chemometrics, 28, 226–34
Gabriel KR (1971): The biplot graphic display of matrices with application to principal component analysis. Biometrika, 58, 453–67
## Not run: data(Linde2015) # Define order of treatments # trts <- c("TCA", "SSRI", "SNRI", "NRI", "Low-dose SARI", "NaSSa", "rMAO-A", "Hypericum", "Placebo") # # Outcome labels # outcomes <- c("Early response", "Early remission") # (1) Early response # p1 <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(resp1, resp2, resp3), n = list(n1, n2, n3), studlab = id, data = Linde2015, sm = "OR") # net1 <- netmeta(p1, comb.fixed = FALSE, seq = trts, ref = "Placebo", small.values = "bad") # (2) Early remission # p2 <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(remi1, remi2, remi3), n = list(n1, n2, n3), studlab = id, data = Linde2015, sm = "OR") # net2 <- netmeta(p2, comb.fixed = FALSE, seq = trts, ref = "Placebo", small.values = "bad") # Partial order of treatment rankings # po2 <- netposet(netrank(net1), netrank(net2), outcomes = outcomes) # Scatter plot # plot(po2) # Same scatter plot as only two outcomes considered in netposet() # plot(po2, "biplot") # Consider three outcomes # # Outcome labels # outcomes <- c("Early response", "Early remission", "Lost to follow-up") # (3) Loss to follow-up # p3 <- pairwise(treat = list(treatment1, treatment2, treatment3), event = list(loss1, loss2, loss3), n = list(n1, n2, n3), studlab = id, data = Linde2015, sm = "OR") # net3 <- netmeta(p3, comb.fixed = FALSE, seq = trts, ref = "Placebo", small.values = "good") # Partial order of treatment rankings (with three outcomes) # po3 <- netposet(netrank(net1), netrank(net2), netrank(net3), outcomes = outcomes) # Hasse diagram # hasse(po3) # Scatter plot # plot(po3) # Biplot (reverse limits of y-axis as biplot is upside down) # plot(po3, "bi", xlim = c(-1, 1.7), ylim = c(2.5, -2.5)) ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.