Description Usage Arguments Details Value Author(s) References See Also Examples
Trimandfill method for estimating and adjusting for the number and outcomes of missing studies in a metaanalysis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21  trimfill(x, ...)
## Default S3 method:
trimfill(x, seTE, left=NULL, ma.fixed=TRUE, type="L", n.iter.max=50,
sm="", studlab=NULL, level=0.95, level.comb=level,
comb.fixed=FALSE, comb.random=TRUE,
hakn=FALSE, method.tau="DL",
prediction=FALSE, level.predict=level,
backtransf=TRUE, pscale=1,
irscale = 1, irunit = "personyears",
silent=TRUE, ...)
## S3 method for class 'meta'
trimfill(x, left=NULL, ma.fixed=TRUE, type="L", n.iter.max=50,
level=x$level, level.comb=x$level.comb,
comb.fixed=FALSE, comb.random=TRUE,
hakn=x$hakn, method.tau=x$method.tau,
prediction=x$prediction, level.predict=x$level.predict,
backtransf=x$backtransf, pscale=x$pscale,
irscale = x$irscale, irunit = x$irunit,
silent=TRUE, ...)

x 
An object of class 
seTE 
Standard error of estimated treatment effect. 
left 
A logical indicating whether studies are supposed to be
missing on the left or right side of the funnel plot. If NULL, the
linear regression test for funnel plot symmetry (i.e., function

ma.fixed 
A logical indicating whether a fixed effect or random effects model is used to estimate the number of missing studies. 
type 
A character indicating which method is used to estimate
the number of missing studies. Either 
n.iter.max 
Maximum number of iterations to estimate number of missing studies. 
sm 
An optional character string indicating underlying summary
measure, e.g., 
studlab 
An optional vector with study labels; ignored if

level 
The level used to calculate confidence intervals for
individual studies. If existing, 
level.comb 
The level used to calculate confidence interval for
the pooled estimate. If existing, 
comb.fixed 
A logical indicating whether a fixed effect metaanalysis should be conducted. 
comb.random 
A logical indicating whether a random effects metaanalysis should be conducted. 
hakn 
A logical indicating whether the method by Hartung and Knapp should be used to adjust test statistics and confidence intervals. 
method.tau 
A character string indicating which method is used
to estimate the betweenstudy variance τ^2. Either

prediction 
A logical indicating whether a prediction interval should be printed. 
level.predict 
The level used to calculate prediction interval for a new study. 
backtransf 
A logical indicating whether results should be
back transformed in printouts and plots. If

pscale 
A numeric giving scaling factor for printing of single
event probabilities, i.e. if argument 
irscale 
A numeric defining a scaling factor for printing of
rates, i.e. if argument 
irunit 
A character specifying the time unit used to calculate rates, e.g. personyears. 
silent 
A logical indicating whether basic information on iterations shown. 
... 
other arguments 
The trimandfill method (Duval, Tweedie 2000a, 2000b) can be used for estimating and adjusting for the number and outcomes of missing studies in a metaanalysis. The method relies on scrutiny of one side of a funnel plot for asymmetry assumed due to publication bias.
Three different methods have been proposed originally to estimate
the number of missing studies. Two of these methods (L and
Restimator) have been shown to perform better in simulations, and
are available in this R function (argument type
).
A fixed effect or random effects model can be used to estimate the
number of missing studies (argument ma.fixed
). Furthermore, a
fixed effect and/or random effects model can be used to summaries
study results (arguments comb.fixed
and
comb.random
). Simulation results (Peters et al. 2007)
indicate that the fixedrandom model, i.e. using a fixed effect
model to estimate the number of missing studies and a random effects
model to summaries results, (i) performs better than the fixedfixed
model, and (ii) performs no worse than and marginally better in
certain situations than the randomrandom model. Accordingly, the
fixedrandom model is the default.
An empirical comparison of the trimandfill method and the Copas selection model (Schwarzer et al. 2010) indicates that the trimandfill method leads to excessively conservative inference in practice. The Copas selection model is available in R package metasens.
The function metagen
is called internally.
An object of class c("metagen", "meta", "trimfill")
. The object is a
list containing the following components:
studlab, sm, left, ma.fixed, type, 

n.iter.max, level, level.comb, level.predict, 
As defined above. 
comb.fixed, comb.random, prediction, hakn, method.tau 

TE, seTE 
Estimated treatment effect and standard error of individual studies. 
lower, upper 
Lower and upper confidence interval limits for individual studies. 
zval, pval 
zvalue and pvalue for test of treatment effect for individual studies. 
w.fixed, w.random 
Weight of individual studies (in fixed and random effects model). 
TE.fixed, seTE.fixed 
Estimated overall treatment effect and standard error (fixed effect model). 
TE.random, seTE.random 
Estimated overall treatment effect and standard error (random effects model). 
seTE.predict 
Standard error utilised for prediction interval. 
lower.predict, upper.predict 
Lower and upper limits of prediction interval. 
k 
Number of studies combined in metaanalysis. 
Q 
Heterogeneity statistic Q. 
tau 
Squareroot of betweenstudy variance. 
method 
Pooling method: 
call 
Function call. 
n.iter 
Actual number of iterations to estimate number of missing studies. 
trimfill 
A logical vector indicating studies that have been added by trimandfill method. 
df.hakn 
Degrees of freedom for test of treatment effect for
HartungKnapp method (only if 
title 
Title of metaanalysis / systematic review. 
complab 
Comparison label. 
outclab 
Outcome label. 
label.e 
Label for experimental group. 
label.c 
Label for control group. 
label.left 
Graph label on left side of forest plot. 
label.right 
Graph label on right side of forest plot. 
k0 
Number of studies added by trimandfill. 
n.e 
Number of observations in experimental group (only for
object 
n.c 
Number of observations in control group (only for object

event.e 
Number of events in experimental group (only for
object 
event.c 
Number of events in control group (only for object

mean.e 
Estimated mean in experimental group (only for object

sd.e 
Standard deviation in experimental group (only for
object 
mean.c 
Estimated mean in control group (only for object

sd.c 
Standard deviation in control group (only for object

n 
Number of observations (only for object 
event 
Number of events (only for object 
cor 
Corelation (only for object 
class.x 
Main class of object 
version 
Version of R package meta used to create object. 
Guido Schwarzer [email protected]
Duval S & Tweedie R (2000a), A nonparametric "Trim and Fill" method of accounting for publication bias in metaanalysis. Journal of the American Statistical Association, 95, 89–98.
Duval S & Tweedie R (2000b), Trim and Fill: A simple funnelplotbased method of testing and adjusting for publication bias in metaanalysis. Biometrics, 56, 455–463.
Peters JL, Sutton AJ, Jones DR, Abrams KR, Rushton L (2007), Performance of the trim and fill method in the presence of publication bias and betweenstudy heterogeneity. Statisics in Medicine, 10, 4544–62.
Schwarzer G, Carpenter J, Rücker G (2010), Empirical evaluation suggests Copas selection model preferable to trimandfill method for selection bias in metaanalysis. Journal of Clinical Epidemiology, 63, 282–8.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  data(Fleiss93)
meta1 < metabin(event.e, n.e, event.c, n.c,
data=Fleiss93, sm="OR")
tf1 < trimfill(meta1)
summary(tf1)
funnel(tf1)
funnel(tf1, pch=ifelse(tf1$trimfill, 1, 16),
level=0.9, comb.random=FALSE)
#
# Use log odds ratios on xaxis
#
funnel(tf1, backtransf=FALSE)
funnel(tf1, pch=ifelse(tf1$trimfill, 1, 16),
level=0.9, comb.random=FALSE, backtransf=FALSE)
trimfill(meta1$TE, meta1$seTE, sm=meta1$sm)

Loading 'meta' package (version 4.82).
Type 'help(meta)' for a brief overview.
Number of studies combined: k = 10 (with 3 added studies)
OR 95%CI z pvalue
Random effects model 0.9231 [0.8252; 1.0327] 1.40 0.1622
Quantifying heterogeneity:
tau^2 = 0.0102; H = 1.26 [1.00; 1.83]; I^2 = 37.4% [0.0%; 70.1%]
Test of heterogeneity:
Q d.f. pvalue
14.37 9 0.1099
Details on metaanalytical method:
 Inverse variance method
 DerSimonianLaird estimator for tau^2
 Trimandfill method to adjust for funnel plot asymmetry
OR 95%CI %W(random)
1 0.7197 [0.4890; 1.0593] 6.7
2 0.6808 [0.4574; 1.0132] 6.4
3 0.8029 [0.6065; 1.0629] 10.7
4 0.8007 [0.4863; 1.3186] 4.4
5 0.7981 [0.5526; 1.1529] 7.2
6 1.1327 [0.9347; 1.3728] 16.5
7 0.8950 [0.8294; 0.9657] 27.9
Filled: 5 1.0466 [0.7246; 1.5118] 7.2
Filled: 1 1.1607 [0.7886; 1.7084] 6.7
Filled: 2 1.2271 [0.8244; 1.8263] 6.4
Number of studies combined: k = 10 (with 3 added studies)
OR 95%CI z pvalue
Random effects model 0.9231 [0.8252; 1.0327] 1.40 0.1622
Quantifying heterogeneity:
tau^2 = 0.0102; H = 1.26 [1.00; 1.83]; I^2 = 37.4% [0.0%; 70.1%]
Test of heterogeneity:
Q d.f. pvalue
14.37 9 0.1099
Details on metaanalytical method:
 Inverse variance method
 DerSimonianLaird estimator for tau^2
 Trimandfill method to adjust for funnel plot asymmetry
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.