copas | R Documentation |
Perform a Copas selection model analysis for selection bias in meta-analysis.
copas( x, level.ma = x$level.ma, gamma0.range = NULL, gamma1.range = NULL, ngrid = 20, nlevels = 10, levels = NULL, slope = NULL, left = NULL, rho.bound = 0.9999, sign.rsb = 0.1, backtransf = x$backtransf, title = x$title, complab = x$complab, outclab = x$outclab, silent = TRUE, warn = options()$warn )
x |
An object of class |
level.ma |
The level used to calculate confidence intervals for pooled estimates. |
gamma0.range |
(Advanced users only) A numerical vector of length two specifying the range of gamma0 values the program will explore. The parameter gamma0 is the constant in the probit selection model for study publication. Thus, the cumulative normal of gamma0 is approximately the probability that a small study is published (in non-technical terms gamma0 relates to the probability of publishing a small study, although its values are not restricted to the range [0,1]; larger values correspond to higher probabilities of publishing a small study). Most users will not need to specify a range for this parameter. When no argument is specified, the program uses an algorithm to determine a suitable range. This is based on the range of treatment effect standard errors in the meta-analysis, and is described in more detail below. |
gamma1.range |
(Advanced users only) A numerical vector of length two specifying the range of gamma1 values the program will explore. The parameter gamma1 is the coefficient of study precision (1/standard error) in the probit selection model for study publication (in non-technical terms gamma1 relates to the rate at which the probability of publishing a study increases as the standard error of the treatment effect it reports decreases; larger values correspond to higher probabilities of publishing a small study). Most users will not need to specify a range for this parameter. When no argument is specified, the program uses an algorithm to determine a suitable range. This is based on the range of treatment effect standard errors in the meta-analysis, and is described in more detail below. |
ngrid |
The program fits the Copas selection model over a grid defined by the range of values of gamma0 and gamma1 specified in the previous two arguments. This parameter fixes the square-root of the number of points in the grid. |
nlevels |
(Advanced users only). Fitting the Copas model over the grid specified by the previous three arguments results in a treatment estimate at every point in the grid. These can then be displayed on a contour plot where contours of treatment effect (z-axis) are shown by gamma0 (x-axis) and gamma1 (y-axis). This argument specifies the number of contour lines that will be drawn. Note (i) Calculations for the contour plot are performed by the function
(ii) If a large number of contour lines are desired, then you may
wish to consider increasing the grid size (argument Leave this option unspecified if you are using the option
|
levels |
A numerical vector of treatment values for which
contour lines will be drawn. In more detail, fitting the Copas
model over the grid specified by the arguments
It is usually not a good idea to set this argument for initial runs, as one does not know the range of treatment values that the contour plot will cover, and treatment values which do not correspond to values in the contour plot (defined by the range of gamma0 and gamma1) will not be plotted. Note (i) Calculations for the contour plot are performed by the function
(ii) Contours will not be drawn if a large number of contour lines
are desired, then you may wish to consider increasing the grid size
(argument Leave this option unspecified if you are using the option
|
slope |
A numeric providing the slope of the line
approximately orthogonal to contours in the contour plot. If the
argument |
left |
A logical indicating whether the cause of any selection
bias is due to missing studies on the left or right of the funnel
plot: left hand side if |
rho.bound |
(Advanced users only) A number giving the upper
bound for the correlation parameter |
sign.rsb |
The significance level for the test of residual selection bias (between 0 and 1). |
backtransf |
A logical indicating whether results should be
back transformed in printouts and plots. If
|
title |
Title of meta-analysis / systematic review. |
complab |
Comparison label. |
outclab |
Outcome label. |
silent |
A logical indicating whether information on progress
in fitting the Copas selection model should be printed:
|
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. |
The program takes an object of class meta
, which is most
easily created by an analysis using one of the functions
metabin
, metacont
and metagen
in the package
meta, performs a 'Copas selection model analysis' and presents a
graphical and tabular summary of the results. An object of class
copas
is created and this can be used to recreate the
results table and graphs subsequently, without re-running the
analysis, using the print
, summary
and plot
function.
Conduct a Copas selection model analysis to investigate, and attempt to correct for, selection / publication bias in a meta-analysis.
The Copas selection model consists of two models, which are fitted jointly. The first is the usual random effects meta-analysis model, and the second is a selection model, where study i is selected for publication if Z>0, where
Z = gamma0 + gamma1 / (SE(i)) + delta(i)
The error delta(i) is correlated with the error in the random effects meta-analysis, with correlation rho. If rho=0, the model corresponds to the usual random effects meta-analysis. As rho moves from 0 to 1, studies with larger treatment estimates are more likely to be selected/published.
The software chooses a grid of gamma0 and gamma1 values,
corresponding to a range of selection / publication probabilities
for the study with the largest treatment effect standard error
(often the smallest study). For each value in this grid, the
treatment effect is estimated using the function optim
. This
information is used to produce the contour plot (top right panel of
output from plot.copas
).
Contours of constant treatment effect are usually locally
parallel. The software estimates the slope of these contours, and
combines this information with other parameter estimates from the
model to explore (i) how the treatment estimate, and its standard
error, change with increasing selection (bottom left panel,
plot.copas
) and (ii) how much selection needs to be
accounted for before any remaining asymmetry in the funnel plot is
likely to have occurred by chance (bottom right panel,
plot.copas
).
A table of results can be produced by the function
summary.copas
. A more detail output is provided by the
function print.copas
.
For a fuller description of the model, our implementation and specifically our approach to estimating the locally parallel contours, see Carpenter et al. (2009) and Schwarzer et al. (2010).
An object of class copas
with corresponding
print
, summary
, and plot
function. The
object is a list containing the following components:
TE |
Vector of treatment effects plotted in treatment effect plot |
seTE |
Vector of standard error of |
TE.random |
Usual random effects estimate of treatment effect |
seTE.random |
Standard error of |
lower.random |
Lower confidence limit of usual random effects estimate |
upper.random |
Upper confidence limit of usual random effects estimate |
statistic.random |
Test statistic of an overall effect (usual random effects model) |
pval.random |
P-value of test of overall effect (usual random effects model) |
TE.adjust |
Adjusted random effects estimate from Copas selection model |
seTE.adjust |
Standard error of |
lower.adjust |
Lower confidence limit of adjusted treatment estimate |
upper.adjust |
Upper confidence limit of adjusted treatment estimate |
statistic.adjust |
Test statistic of an overall effect (Copas selection model) |
pval.adjust |
P-value of test of overall effect (Copas selection model) |
left |
Whether selection bias expected on left or right |
rho.bound |
Bound on |
gamma0.range |
Range of gamma0 (see help on |
gamma1.range |
Range of gamma1 (see help on |
slope |
Slope of line approximately orthogonal to contours in contour plot |
regr |
A list containing information on regression lines fitted to contours in contour plot |
ngrid |
Square root of grid size |
nlevels |
Number of contour lines |
gamma0 |
Vector of gamma0 values at which model fitted (determined by gamma0.range and grid). x-axis values for contour plot |
gamma1 |
vector of gamma1 values at which model fitted (determined by gamma1.range and grid). y-axis values for contour plot |
TE.contour |
Treatment values (ie z-axis values) used to draw contour plot. |
x.slope |
x coordinates for 'orthogonal line' in contour plot |
y.slope |
y coordinates for 'orthogonal line' in contour plot |
TE.slope |
Vector of treatment values plotted in treatment effect plot |
seTE.slope |
Standard error of |
rho.slope |
Vector of estimated rho values corresponding to
treatment estimates in |
tau.slope |
Vector of estimated heterogeneity values
corresponding to treatment estimates in |
loglik1 |
Vector of log-likelihood values corresponding to
treatment estimates in |
conv1 |
Numerical vector indicating convergence status for
each treatment estimate in |
message1 |
Character vector - translation of |
loglik2 |
Vector of log-likelihoods from fitting model to evaluate presence of residual selection bias |
conv2 |
Numerical vector indicating convergence status for
models to evaluate presence of residual selection bias - see
parameter |
message2 |
Character vector - translation of |
publprob |
Vector of probabilities of publishing the smallest
study, used in x-axis of bottom two panels in function
|
pval.rsb |
P-values for tests on presence of residual
selection bias, plotted in bottom right panel in
|
sign.rsb |
The significance level for the test of residual selection bias |
N.unpubl |
Approximate number of studies the model suggests remain unpublished |
sm |
Effect measure (e.g., for binary data, OR - odds ratio, RR - risk ratio, RD - risk difference, AS - arcsin difference) |
title |
Title of meta-analysis / systematic review. |
complab |
Comparison label. |
outclab |
Outcome label. |
call |
Call to |
version |
Version of R package metasens used to create object. |
x |
Details of meta-analysis object used as input into
|
James Carpenter James.Carpenter@lshtm.ac.uk, Guido Schwarzer guido.schwarzer@uniklinik-freiburg.de
Carpenter JR, Schwarzer G, Rücker G, Künstler R (2009): Empirical evaluation showed that the Copas selection model provided a useful summary in 80% of meta-analyses. Journal of Clinical Epidemiology, 62, 624–31
Copas J (1999): What works?: Selectivity models and meta-analysis. Journal of the Royal Statistical Society, Series A, 162, 95–109
Copas J, Shi JQ (2000): Meta-analysis, funnel plots and sensitivity analysis. Biostatistics, 1, 247–62
Copas JB, Shi JQ (2001): A sensitivity analysis for publication bias in systematic reviews. Statistical Methods in Medical Research, 10, 251–65
Schwarzer G, Carpenter J, Rücker G (2010): Empirical evaluation suggests Copas selection model preferable to trim-and-fill method for selection bias in meta-analysis. Journal of Clinical Epidemiology, 63, 282–8
plot.copas
, summary.copas
,
metabias
, metagen
,
funnel
data(Fleiss1993bin, package = "meta") # Perform meta-analysis # (Note d.asp indicates deaths, n.asp total in aspirin group; # d.plac indicates deaths, n.plac total in placebo group) # m1 <- metabin(d.asp, n.asp, d.plac, n.plac, data = Fleiss1993bin, sm = "OR") m1 # Perform a basic Copas selection model analysis # cop1 <- copas(m1) plot(cop1) cop1 # # Interpretation: # # a. The initial meta-analysis shows the common and random effects # pooled ORs differ; consistent with asymmetry in the funnel # plot and possible selection bias. Both common effect and random # effects model show a significant treatment effect in this # dataset. # # b. Plotting the copas analysis shows # # (i) funnel plot: asymmetry indicates possible selection bias. # # (ii) contour plot treatment effect declines steadily as selection # increases (no selection, top right, log OR < -0.12; # increasing selection as move to left of plot, log OR rises # to -0.03. # # (iii) Treatment effect plot suggests that even with no selection, # p-value for treatment effect is larger than 0.05 which is # different from the result of the usual random effects model # (see output of summary(cop1). This difference is due to the # use of different methods to estimate the between-study # variance: maximum-likelihood in Copas analysis compared to # method-of-moments in usual random effects model. The # p-value for treatment effect is increasing with increasing # selection. # # (iv) P-value for residual selection bias plot: this shows that # even with no selection bias, the p-value for residual # selection bias is non-significant at the 10% level. As # expected, as selection increases the p-value for residual # selection bias increases too. # Repeat the same example, setting several arguments of the copas # function: # cop2 <- copas(m1, gamma0.range = c(-0.5, 2.1), # range of gamma0 parameter gamma1.range = c(0, 0.08), # range of gamma1 parameter ngrid = 20, # specify a 20x20 grid (finer than default) levels = c(-0.13, -0.12, -0.1, -0.09, -0.07, -0.05, -0.03), # specify contour lines slope = 0.2, # specify slope of 'orthogonal' line in contour plot left = FALSE, # as any selection bias due to missing studies on right rho.bound = 0.998, # constrain rho between [-0.998, 0.998] silent = FALSE, # update user on progress warn = -1 # suppress warning messages ) plot(cop2) # # Print table of results used to draw treatment effect plot: # cop2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.