plot.copas {copas} | R Documentation |
Four plots (selectable by 'which') are currently available: (1) funnel plot, (2) contour plot, (3) treatment effect plot, (4) p-value for residual publication bias plot. By default, all plots are provided.
plot.copas(x, which=1:4, caption=c("Funnel plot", "Contour plot", "Treatment effect plot", "P-value for residual selection bias"), xlim.pp=NULL, level=0.95, orthogonal.line=TRUE, lines=FALSE, warn=-1, ...)
x |
An object of class copas , generated by the copas function |
which |
Specify plots required: 1:4 produces all plots (default); 3 produces plot 3 etc; c(1,3) produces plots 1 and 3, and so on. |
caption |
Specify plot captions. Note that four captions must be
specified even if fewer graphs are displayed (which is the case if
the predefined captions are utilised). This must be
considered if user-defined captions are provided. Captions
corresponding to plots that are not displayed can be left empty. For
example, if only plot 3 is selected, we might specify
caption=c("","","Plot 3","") . |
xlim.pp |
A vector of x-axis limits for plots 3 and 4, i.e. for
the probability of publishing the study with largest standard
deviation. E.g. to specify limits between 0.3 and 0.1 set
xlim.pp=c(0.3,0.1) . |
level |
The level used to calculate confidence intervals for plot 3 (treatment effect plot) (between 0 and 1). |
orthogonal.line |
A logical indicating whether the orthogonal line should be displayed in plot 2 (contour plot). |
lines |
(Diagnostic use only) A logical indicating whether
regression lines should be plotted in contour plot. These regression
lines attempt to summarise each contour of constant treatment effect
by a straight line, prior to calculating the orthogonal
line. Regression lines with a positive adjusted R^2 will be
printed in green color, others will be printed in red color.
|
warn |
A number setting the handling of warning messages. It is
not uncommon for numerical problems to be encountered during
estimation over the grid of (gamma0, gamma1) values. Usually this
does not indicate a serious problem. This option specifies what to
do with warning messages. warn=-1 : ignore all warnings;
warn=0 (the default): store warnings till function finishes;
if there are less than 10, print them, otherwise print a message
saying warning messages were generated; warn=1 : print
warnings as they occur; warn=2 : stop the function when the
first warning is generated. For further details see
help(options) . |
... |
other arguments to the function will be ignored (this option only included to conform with R standards) |
Takes an object created by the copas
function and draws up to
four plots to display the results of the Copas selection modelling.
The argument which
specifies the plots to be drawn; plot numbers
below will be produced by setting which=1
, etc.
Plot 1: Funnel plot of studies in meta-analysis. Vertical grey line is usual random effects estimate (DerSimonian-Laird method); vertical broken line is fixed effects estimate.
Plot 2:
Plot of contours of treatment effect (estimated by the Copas model) as the
selection probability varies (the selection probability is a function
of gamma0 and gamma1 - see help(copas)
or the reference below).
Plot 3:
Assuming the contours of treatment effect in Plot 2 are locally
parallel, the results can be summarised in terms of the probability of
publishing the study with the largest standard error. This plot
displays the results of doing this, showing how the estimated
treatment effect (and 100*level
% confidence interval) vary as the
probability of publishing the study with the largest standard error
decreases.
The three horizontal grey lines are the usual random effects treatment
estimate (centre) +/- the 100*level
% confidence interval
(upper/lower grey lines).
Plot 4: For any degree of selection (i.e. probability of the study with largest SE being published), we can calculate a p-value for the hypothesis that no further selection remains unexplained in the data. These plot displays these p-values against the probability that the study with the largest SE is published.
Under the copas selection model, probabilities of the smallest study being published which correspond to p-values for residual selection bias that are larger than 0.1 are more plausible. The corresponding treatment effect in plot 3 is thus the most plausible under the copas selection model.
Note
In the current version, fine control of the graphics parameters for
the individual panels is not possible. However, all the data used to
create the plots can be extracted manually from the object created by
the copas
function (see attributes list for copas
) and
used to create tailor-made plots.
James Carpenter James.Carpenter@lshtm.ac.uk, Guido Schwarzer sc@imbi.uni-freiburg.de
Carpenter JR, Schwarzer G, Rucker G and Kunstler R (2008), Empirical evaluation shows the Copas selection model provides a useful summary in 80% of meta-analyses. Revision submitted to Journal of Clinical Epidemiology.
copas
, summary.copas
, metabias
, metagen
# Simple example: # # Load data # data(Fleiss93) # # Perform meta-analysis (outcome measure is OR = odds ratio) # meta1 <- metabin(event.e, n.e, event.c, n.c, data=Fleiss93, sm="OR") # # Perform copas analysis # cop1 <- copas(meta1) # # Plot results # plot(cop1) # # Only do plots 1 and 2 (without orthogonal line) # plot(cop1, which=1:2, orth=FALSE) # # Another example showing use of arguments # Note the use of \n to create a new line in the caption # plot(cop1, which=3, caption=c("", "", "Variation in estimated treatment\n effect with selection", ""), xlim.pp=c(1,0.5))