Title: | Meta-Analysis |
---|---|
Description: | Functions for simple fixed and random effects meta-analysis for two-sample comparisons and cumulative meta-analyses. Draws standard summary plots, funnel plots, and computes summaries and tests for association and heterogeneity. |
Authors: | Thomas Lumley |
Maintainer: | Thomas Lumley <[email protected]> |
License: | GPL-2 |
Version: | 3.0 |
Built: | 2024-11-14 06:41:06 UTC |
Source: | CRAN |
Data on the effectiveness of silver sulfadiazine coating on venous catheters for preventing bacterial colonisation of the catheter and bloodstream infection
data(catheter)
data(catheter)
A data.frame with 8 variables giving information about 16 controlled trials of antibacterial-coated venous catheters
Name : | Name of principal author |
n.trt : | number of coated catheters |
n.ctrl : | number of standard catheters |
col.trt : | number of coated catheters colonised |
by bacteria | |
col.ctrl : | number of standard catheters colonised |
by bacteria | |
inf.trt : | number of coated catheters resulting in |
bloodstream infection | |
inf.ctrl : | number of standard catheters resulting in |
bloodstream infection | |
or : | Odds ratio |
Veenstra D et al (1998) "Efficacy of Antiseptic Impregnated Central Venous Catheters in Preventing Nosocomial Infections: A Meta-analysis" JAMA 281:261-267
library(rmeta) data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name,subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) a b summary(a) summary(b) plot(a) plot(b)
library(rmeta) data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name,subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) a b summary(a) summary(b) plot(a) plot(b)
Data from randomised trials before 1980 of corticosteroid therapy in premature labour and its effect on neonatal death.
data(cochrane)
data(cochrane)
This data frame contains the following columns:
Identifier for the study
Number of deaths in the treated group
Number in the treated group
Number of deaths in the control group
Number in the control group
This meta-analysis, if done, would likely have resulted in the treatment being widely used a decade earlier than it was, saving many lives. The graph is part of the logo of the Cochrane Collaboration, a group aiming to perform systematic reviews of the entire clinical trial literature.
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) plot(steroid, col=meta.colors("RoyalBlue"))
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) plot(steroid, col=meta.colors("RoyalBlue"))
A cumulative meta-analysis plot shows how evidence has accumulated over
time. The i
th line in the cumulative meta-analysis plot is the
summary produced by a meta-analysis of the first i
trials.
cummeta(ntrt, nctrl, ptrt, pctrl, conf.level = 0.95, names = NULL, data= NULL, subset = NULL, na.action = na.fail, method = c("meta.MH", "meta.DSL"), statistic = "OR") cummeta.summaries(effects,stderrs, conf.level = 0.95, names = NULL,weights=NULL, data= NULL, subset = NULL, na.action = get(getOption("na.action")), method = c("fixed", "random"), logscale=TRUE) ## S3 method for class 'meta.cum' plot(x, conf.level = NULL, colors = meta.colors(), xlab = NULL, summary.line = TRUE, summary.conf = FALSE, main="Cumulative meta-analysis", lwd=1, ...) ## S3 method for class 'meta.cum' summary(object ,conf.level=NULL,...)
cummeta(ntrt, nctrl, ptrt, pctrl, conf.level = 0.95, names = NULL, data= NULL, subset = NULL, na.action = na.fail, method = c("meta.MH", "meta.DSL"), statistic = "OR") cummeta.summaries(effects,stderrs, conf.level = 0.95, names = NULL,weights=NULL, data= NULL, subset = NULL, na.action = get(getOption("na.action")), method = c("fixed", "random"), logscale=TRUE) ## S3 method for class 'meta.cum' plot(x, conf.level = NULL, colors = meta.colors(), xlab = NULL, summary.line = TRUE, summary.conf = FALSE, main="Cumulative meta-analysis", lwd=1, ...) ## S3 method for class 'meta.cum' summary(object ,conf.level=NULL,...)
ntrt |
Number of subjects in treated/exposed group |
nctrl |
Number of subjects in control group |
ptrt |
Number of events in treated/exposed group |
pctrl |
Number of events in control group |
effects |
Difference between control and treatment group |
stderrs |
Standard errors of |
weights |
Study weights (see |
names |
names or labels for studies |
data |
data frame to interpret variables |
subset |
subset of studies to include |
na.action |
How to handle missing values |
method |
Which meta-analysis method to use |
statistic |
"OR" for odds ratio or "RR" for relative risk. |
logscale |
The |
x , object
|
a |
... |
other graphical arguments for |
conf.level |
Coverage for confidence intervals |
colors |
see |
xlab |
X-axis label |
summary.line |
Plot a vertical line at the final summary value? |
summary.conf |
Plot vertical lines at the final confidence interval limits? |
main , lwd
|
graphical parameters |
Object of class meta.cum
.
data(cochrane) steroid<-cummeta(n.trt,n.ctrl,ev.trt,ev.ctrl,names=name,data=cochrane, statistic="RR",method="meta.MH") plot(steroid) summary(steroid) data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,12,4,11,1,8,10,2)) d <- cummeta.summaries(b$logs, b$selogs, names=b$names, method="random", logscale=TRUE) plot(d,summary.conf=TRUE) summary(d)
data(cochrane) steroid<-cummeta(n.trt,n.ctrl,ev.trt,ev.ctrl,names=name,data=cochrane, statistic="RR",method="meta.MH") plot(steroid) summary(steroid) data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,12,4,11,1,8,10,2)) d <- cummeta.summaries(b$logs, b$selogs, names=b$names, method="random", logscale=TRUE) plot(d,summary.conf=TRUE) summary(d)
Draw a forest plot together with a table of text.
forestplot(labeltext, mean, lower, upper, align = NULL, is.summary = FALSE, clip = c(-Inf, Inf), xlab = "", zero = 0, graphwidth = unit(2, "inches"), col = meta.colors(), xlog = FALSE, xticks=NULL, boxsize=NULL,...)
forestplot(labeltext, mean, lower, upper, align = NULL, is.summary = FALSE, clip = c(-Inf, Inf), xlab = "", zero = 0, graphwidth = unit(2, "inches"), col = meta.colors(), xlog = FALSE, xticks=NULL, boxsize=NULL,...)
labeltext |
Matrix of strings or |
mean |
Vector of centers of confidence intervals (or |
lower |
Vector of lower ends of confidence intervals |
upper |
Vector of upper ends of confidence intervals |
align |
Vector giving alignment ( |
is.summary |
Vector of logicals. Summary lines have bold text and diamond confidence intervals. |
clip |
Lower and upper limits for clipping confidence intervals to arrows |
xlab |
x-axis label |
zero |
x-axis coordinate for zero line |
graphwidth |
Width of confidence interval graph |
col |
See |
xlog |
If |
xticks |
Optional user-specified x-axis tick marks. Specify |
boxsize |
Override the default box size based on precision |
... |
Not used. |
This function is more flexible than metaplot
and the
plot
methods for meta-analysis objects, but requires more work by
the user.
In particular, it allows for a table of text, and clips confidence intervals to arrows when they exceed specified limits.
None
metaplot
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) tabletext<-cbind(c("","Study",steroid$names,NA,"Summary"), c("Deaths","(steroid)",cochrane$ev.trt,NA,NA), c("Deaths","(placebo)", cochrane$ev.ctrl, NA,NA), c("","OR",format(exp(steroid$logOR),digits=2),NA,format(exp(steroid$logMH),digits=2)) ) m<- c(NA,NA,steroid$logOR,NA,steroid$logMH) l<- m-c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2 u<- m+c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2 forestplot(tabletext,m,l,u,zero=0, is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE), clip=c(log(0.1),log(2.5)), xlog=TRUE, col=meta.colors(box="royalblue", line="darkblue", summary="royalblue")) forestplot(tabletext,m,l,u,zero=0, is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE), clip=c(log(0.1),log(2.5)), xlog=TRUE, boxsize=0.75, col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) tabletext<-cbind(c("","Study",steroid$names,NA,"Summary"), c("Deaths","(steroid)",cochrane$ev.trt,NA,NA), c("Deaths","(placebo)", cochrane$ev.ctrl, NA,NA), c("","OR",format(exp(steroid$logOR),digits=2),NA,format(exp(steroid$logMH),digits=2)) ) m<- c(NA,NA,steroid$logOR,NA,steroid$logMH) l<- m-c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2 u<- m+c(NA,NA,steroid$selogOR,NA,steroid$selogMH)*2 forestplot(tabletext,m,l,u,zero=0, is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE), clip=c(log(0.1),log(2.5)), xlog=TRUE, col=meta.colors(box="royalblue", line="darkblue", summary="royalblue")) forestplot(tabletext,m,l,u,zero=0, is.summary=c(TRUE,TRUE,rep(FALSE,8),TRUE), clip=c(log(0.1),log(2.5)), xlog=TRUE, boxsize=0.75, col=meta.colors(box="royalblue",line="darkblue", summary="royalblue"))
Plots the treatment difference for trials against the size of the trial (or other specified variable). Asymmetry in the plot often indicates publication bias. Generic, with methods for meta-analysis objects.
funnelplot(x,...) ## Default S3 method: funnelplot(x, se, size=1/se, summ=NULL, xlab="Effect", ylab="Size", colors=meta.colors(), conf.level=0.95, plot.conf=FALSE, zero=NULL, mirror=FALSE, ...)
funnelplot(x,...) ## Default S3 method: funnelplot(x, se, size=1/se, summ=NULL, xlab="Effect", ylab="Size", colors=meta.colors(), conf.level=0.95, plot.conf=FALSE, zero=NULL, mirror=FALSE, ...)
x |
Treatment difference |
se |
Standard error of |
size |
Variable for the vertical axis |
summ |
summary treatment difference |
xlab |
x-axis label |
ylab |
y-axis label |
colors |
list of colors for components of the plot |
conf.level |
For confidence interval plotting |
plot.conf |
Plot confidence intervals instead of just points? |
zero |
location of a null hypothesis line |
mirror |
Add points reflected around |
... |
further arguments to be passed from or to methods. |
With the default value of size
the plot should appear as a
upwards-pointing funnel shape. Publication bias often causes one side
of the funnel to be trimmed near the base. The mirror
plot
creates a symmetric funnel by reflecting the plot around the
summ
value. In the presence of publication bias the added
points will separate from the real studies.
Used for its side-effect.
Thomas Lumley
meta.DSL
,
meta.MH
,
meta.summaries
,
metaplot
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) funnelplot(a$logOR, a$selogOR) funnelplot(a$logOR, a$selogOR, plot.conf=TRUE, summ=a$logMH, mirror=TRUE) funnelplot(a, plot.conf=TRUE)
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) funnelplot(a$logOR, a$selogOR) funnelplot(a$logOR, a$selogOR, plot.conf=TRUE, summ=a$logMH, mirror=TRUE) funnelplot(a, plot.conf=TRUE)
Wrapper function for specifying colours to meta-analysis plots
meta.colors(all.elements, box="black", lines="gray", summary="black", zero="lightgray", mirror="lightblue", text="black", axes="black",background=NA)
meta.colors(all.elements, box="black", lines="gray", summary="black", zero="lightgray", mirror="lightblue", text="black", axes="black",background=NA)
all.elements |
if present, overrides other arguments |
box |
Colour of sample size box |
lines |
Colour of confidence intervals |
summary |
Colour of summary estimate |
zero |
Colour of null hypothesis line |
mirror |
Colour of reflected points (in |
text |
Colour of labels |
axes |
Colour of x-axis and axis labels |
background |
Background colour. |
a list of colors
plot.meta.MH
,plot.meta.DSL
,plot.meta.summaries
,funnelplot
,metaplot
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) ## All black, for better photocopying plot(steroid, col=meta.colors("black")) ## distinguish the summary plot(steroid,colors=meta.colors(summary="forestgreen")) data(catheter) e <- meta.DSL(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) ## Truly awful colour scheme to illustrate flexibility plot(e, colors=meta.colors(summary="green",lines=c("purple","skyblue"), box="red",zero="yellow",text=palette(),background="tomato", axes="lightgreen")) ## Dark blue background popular for presentations. plot(e, colors=meta.colors(summary="white",lines="#FFFFF0", box="#FFFF50",zero="grey90",text="white",background="darkblue", axes="grey90"))
data(cochrane) steroid <- meta.MH(n.trt, n.ctrl, ev.trt, ev.ctrl, names=name, data=cochrane) ## All black, for better photocopying plot(steroid, col=meta.colors("black")) ## distinguish the summary plot(steroid,colors=meta.colors(summary="forestgreen")) data(catheter) e <- meta.DSL(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) ## Truly awful colour scheme to illustrate flexibility plot(e, colors=meta.colors(summary="green",lines=c("purple","skyblue"), box="red",zero="yellow",text=palette(),background="tomato", axes="lightgreen")) ## Dark blue background popular for presentations. plot(e, colors=meta.colors(summary="white",lines="#FFFFF0", box="#FFFF50",zero="grey90",text="white",background="darkblue", axes="grey90"))
Computes the individual odds ratios or relative risks, the summary, the random
effects variance, and Woolf's test for heterogeneity. The print
method gives the summary and test for heterogeneity; the summary
method also gives all the individual odds ratios and confidence
intervals. Studies with zero or infinite odds ratio are omitted, as
their variance cannot be calculated sensibly.
The plot
method draws a standard meta-analysis plot. The
confidence interval for each study is given by a horizontal line, and
the point estimate is given by a square whose height is inversely
proportional to the standard error of the estimate. The summary odds
ratio, if requested, is drawn as a diamond with horizontal limits at the
confidence limits and width inversely proportional to its standard
error.
meta.DSL(ntrt, nctrl, ptrt, pctrl, conf.level=0.95, names=NULL, data=NULL, subset=NULL, na.action=na.fail,statistic="OR") ## S3 method for class 'meta.DSL' summary(object, conf.level=NULL, ...) ## S3 method for class 'meta.DSL' plot(x, summary=TRUE, summlabel="Summary", conf.level=NULL, colors=meta.colors(), xlab=NULL,...)
meta.DSL(ntrt, nctrl, ptrt, pctrl, conf.level=0.95, names=NULL, data=NULL, subset=NULL, na.action=na.fail,statistic="OR") ## S3 method for class 'meta.DSL' summary(object, conf.level=NULL, ...) ## S3 method for class 'meta.DSL' plot(x, summary=TRUE, summlabel="Summary", conf.level=NULL, colors=meta.colors(), xlab=NULL,...)
ntrt |
Number of subjects in treated/exposed group |
nctrl |
Number of subjects in control group |
ptrt |
Number of events in treated/exposed group |
pctrl |
Number of events in control group |
conf.level |
Coverage for confidence intervals |
names |
names or labels for studies |
data |
data frame to interpret variables |
subset |
subset of studies to include |
na.action |
a function which indicates what should happen when
the data contain |
statistic |
"OR" for odds ratio, "RR" for relative risk |
x , object
|
a |
summary |
Plot the summary odds ratio? |
summlabel |
Label for the summary odds ratio |
colors |
see |
xlab |
x-axis label, default is based on |
... |
further arguments to be passed from or to methods. |
An object of class meta.DSL
with print
, plot
, funnelplot
and
summary
methods.
Thomas Lumley
data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) b summary(b) plot(b) e <- meta.DSL(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) e summary(e) ##tasteless plot(e, colors=meta.colors(summary="green",lines="purple",box="orange"))
data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) b summary(b) plot(b) e <- meta.DSL(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) e summary(e) ##tasteless plot(e, colors=meta.colors(summary="green",lines="purple",box="orange"))
Computes the individual odds ratio or relative risk, the
Mantel-Haenszel summary, and Woolf's test for heterogeneity. The
print
method gives the summary and test for heterogeneity; the
summary
method also gives all the individual odds ratios and
confidence intervals.
The plot
method draws a standard meta-analysis plot. The
confidence interval for each study is given by a horizontal line, and
the point estimate is given by a square whose height is inversely
proportional to the standard error of the estimate. The summary odds
ratio, if requested, is drawn as a diamond with horizontal limits at the
confidence limits and width inversely proportional to its standard
error.
meta.MH(ntrt, nctrl, ptrt, pctrl, conf.level=0.95, names=NULL, data=NULL, subset=NULL, na.action = na.fail,statistic="OR") ## S3 method for class 'meta.MH' summary(object, conf.level=NULL, ...) ## S3 method for class 'meta.MH' plot(x, summary=TRUE, summlabel="Summary", conf.level=NULL, colors=meta.colors(),xlab=NULL, ...)
meta.MH(ntrt, nctrl, ptrt, pctrl, conf.level=0.95, names=NULL, data=NULL, subset=NULL, na.action = na.fail,statistic="OR") ## S3 method for class 'meta.MH' summary(object, conf.level=NULL, ...) ## S3 method for class 'meta.MH' plot(x, summary=TRUE, summlabel="Summary", conf.level=NULL, colors=meta.colors(),xlab=NULL, ...)
ntrt |
Number of subjects in treated/exposed group |
nctrl |
Number of subjects in control group |
ptrt |
Number of events in treated/exposed group |
pctrl |
Number of events in control group |
names |
names or labels for studies |
data |
data frame to interpret variables |
subset |
subset of studies to include |
na.action |
a function which indicates what should happen when
the data contain |
statistic |
"OR" for odds ratio, "RR" for relative risk |
x , object
|
a |
summary |
Plot the summary odds ratio? |
summlabel |
Label for the summary odds ratio |
conf.level |
Coverage for confidence intervals |
colors |
see |
xlab |
x-axis label, default is based on |
... |
further arguments to be passed to or from methods. |
An object of class meta.MH
with print
, plot
, funnelplot
and
summary
methods.
There are at least two other ways to do a fixed effects meta-analysis of binary data. Peto's method is a computationally simpler approximation to the Mantel-Haenszel approach. It is also possible to weight the individual odds ratios according to their estimated variances. The Mantel-Haenszel method is superior if there are trials with small numbers of events (less than 5 or so in either group)
Thomas Lumley
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) a summary(a) plot(a) d <- meta.MH(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) d summary(d) ## plot with par("fg") plot(d, colors=meta.colors(NULL))
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) a summary(a) plot(a) d <- meta.MH(n.trt, n.ctrl, inf.trt, inf.ctrl, data=catheter, names=Name, subset=c(13,6,3,12,4,11,1,14,8,10,2)) d summary(d) ## plot with par("fg") plot(d, colors=meta.colors(NULL))
Computes a summary estimate and confidence interval from a collection of treatment effect estimates and standard errors. Allows fixed or random effects, optional quality weights.
meta.summaries(d, se, method=c("fixed", "random"), weights=NULL, logscale=FALSE, names=NULL, data=NULL, conf.level=0.95, subset=NULL,na.action=na.fail) ## S3 method for class 'meta.summaries' summary(object,conf.level=NULL,...) ## S3 method for class 'meta.summaries' plot(x,summary=TRUE,summlabel="Summary", conf.level=NULL,colors=meta.colors(), xlab=NULL,logscale=NULL,...)
meta.summaries(d, se, method=c("fixed", "random"), weights=NULL, logscale=FALSE, names=NULL, data=NULL, conf.level=0.95, subset=NULL,na.action=na.fail) ## S3 method for class 'meta.summaries' summary(object,conf.level=NULL,...) ## S3 method for class 'meta.summaries' plot(x,summary=TRUE,summlabel="Summary", conf.level=NULL,colors=meta.colors(), xlab=NULL,logscale=NULL,...)
d |
Effect estimates |
se |
standard errors for |
method |
Standard errors and default weights from fixed or random-effects? |
weights |
Optional weights (eg quality weights) |
logscale |
Effect is on a log scale? (for plotting) |
names |
labels for the separate studies |
data |
optional data frame to find variables in |
conf.level |
level for confidence intervals |
subset |
Which studies to use |
na.action |
a function which indicates what should happen when
the data contain |
x , object
|
a |
summary |
Plot the summary odds ratio? |
summlabel |
Label for the summary odds ratio |
colors |
see |
xlab |
label for the effect estimate axis. |
... |
further arguments to be passed to or from methods. |
The summary estimate is a weighted average. If weights
are
specified they are used, otherwise the reciprocal of the estimated
variance is used.
The estimated variance is the square of se
for a fixed
analysis. For a random analysis a heterogeneity variance is estimated
and added.
The variance of a weighted average is a weighted average of the estimated variances using the squares of the weights. This is the square of the summary standard error.
With the default weights these are the standard fixed and random effects calculations.
An object of class meta.summaries
, which has
print
,plot
,summary
and funnelplot
methods.
Thomas Lumley
meta.DSL
,
meta.MH
,
funnelplot
,
metaplot
data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,12,4,11,1,8,10,2)) d <- meta.summaries(b$logs, b$selogs, names=b$names, method="random", logscale=TRUE)
data(catheter) b <- meta.DSL(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,12,4,11,1,8,10,2)) d <- meta.summaries(b$logs, b$selogs, names=b$names, method="random", logscale=TRUE)
Plot confidence intervals with boxes indicating the sample
size/precision and optionally a diamond indicating a summary
confidence interval. This function is usually called by plot
methods for meta-analysis objects.
metaplot(mn, se, nn=NULL, labels=NULL, conf.level=0.95, xlab="Odds ratio", ylab="Study Reference",xlim=NULL, summn=NULL, sumse=NULL, sumnn=NULL, summlabel="Summary", logeffect=FALSE, lwd=2, boxsize=1, zero=as.numeric(logeffect), colors=meta.colors(), xaxt="s", logticks=TRUE, ...)
metaplot(mn, se, nn=NULL, labels=NULL, conf.level=0.95, xlab="Odds ratio", ylab="Study Reference",xlim=NULL, summn=NULL, sumse=NULL, sumnn=NULL, summlabel="Summary", logeffect=FALSE, lwd=2, boxsize=1, zero=as.numeric(logeffect), colors=meta.colors(), xaxt="s", logticks=TRUE, ...)
mn |
point estimates from studies |
se |
standard errors of |
nn |
precision: box ares is proportional to this. |
labels |
labels for each interval |
conf.level |
Confidence level for confidence intervals |
xlab |
label for the point estimate axis |
ylab |
label for the axis indexing the different studies |
xlim |
the range for the x axis. |
summn |
summary estimate |
sumse |
standard error of summary estimate |
sumnn |
precision of summary estimate |
summlabel |
label for summary estimate |
logeffect |
|
lwd |
line width |
boxsize |
Scale factor for box size |
zero |
"Null" effect value |
xaxt |
use |
logticks |
if |
.
colors |
see |
... |
Other graphical parameters |
This function is used for its side-effect.
forestplot
for more flexible plots
plot.meta.DSL
,
plot.meta.MH
,
plot.meta.summaries
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE) metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE,logticks=FALSE) ## angry fruit salad metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE, colors=meta.colors(box="magenta", lines="blue", zero="red", summary="orange", text="forestgreen"))
data(catheter) a <- meta.MH(n.trt, n.ctrl, col.trt, col.ctrl, data=catheter, names=Name, subset=c(13,6,5,3,7,12,4,11,1,8,10,2)) metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE) metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE,logticks=FALSE) ## angry fruit salad metaplot(a$logOR, a$selogOR, nn=a$selogOR^-2, a$names, summn=a$logMH, sumse=a$selogMH, sumnn=a$selogMH^-2, logeffect=TRUE, colors=meta.colors(box="magenta", lines="blue", zero="red", summary="orange", text="forestgreen"))