Last data update: 2014.03.03

R: Funnel Plot
funnelplotR Documentation

Funnel Plot

Description

This function (1) imputes data for a meta-analytic data set with unpublished studies, then (2) generates a funnel plot.

Usage

funnelplot(table, 
  binary=TRUE, mean.sd=TRUE,
  higher.is.better=NA,
  outlook=NA,
  vpos=NA, pos=NA, neg=NA, vneg=NA,
  level=95, 
  binary.measure="RR", continuous.measure="SMD",
  summary.measure="SMD", method="DL", 
  random.number.seed=NA, sims=1, smd.noise=0.01,
  title="", pch.pub=19, pch.unpub=0)

Arguments

table

The name of the table containing the meta-analysis data.

binary

TRUE if the outcomes are binary events; FALSE if the outcome data is continuous.

mean.sd

TRUE if the data set includes the mean and standard deviation of the both the control and experimental arms of studies with continuous outcomes; FALSE otherwise.

higher.is.better

TRUE if higher counts of binary events or higher continuous outcomes are desired; FALSE otherwise. For continuous outcomes, set as FALSE if a lower outcome (eg. a more negative number) is desired.

outlook

If you want all unpublished studies to be assigned the same outcome, set this parameter to one of the following values: "very positive", "positive", "current effect", "negative", "very negative", "no effect", "very positive CL", "positive CL", "negative CL", "very negative CL".

vpos

The user-defined effect size for unpublished studies with a "very positive" outlook.

pos

The user-defined effect size for unpublished studies with a "positive" outlook.

neg

The user-defined effect size for unpublished studies with a "negative" outlook.

vneg

The user-defined effect size for unpublished studies with a "very negative" outlook.

level

The confidence level, as a percent.

binary.measure

The effect size measure used for binary outcomes. "RR" for relative risk; "OR" for odds ratios.

continuous.measure

The effect size measure used for continuous outcomes. "SMD" for standardized mean difference (with the assumption of equal variances).

summary.measure

The measure used for summary effect sizes.

method

The same parameter in the escalc() function of the metafor package. "DL" for the DerSimonian-Laird method.

random.number.seed

Leave as NA if results are to be randomized each time. Set this value to a integer between 0 and 255 if results are to be consistent (for purposes of testing and comparison).

sims

The number of simulations to run per study when imputing unpublished studies with binary outcomes.

smd.noise

The standard deviation of Gaussian random noise to be added to standardized mean differences when imputing unpublished studies with continuous outcomes.

title

The title of the funnel plot.

pch.pub

The symbol used to denote a published study.

pch.unpub

The symbol used to denote an unpublished study.

Note

The function employs functions in the metafor package: escalc() and forest().

Author(s)

Noory Kim

See Also

forestsens

Examples

library(SAMURAI)

data(Hpylori)
funnelplot(Hpylori, binary=TRUE, higher.is.better=FALSE, 
  outlook="very negative")

data(greentea)
funnelplot(greentea, binary=FALSE, higher.is.better=FALSE)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(SAMURAI)
Loading required package: metafor
Loading required package: Matrix
Loading 'metafor' package (version 1.9-8). For an overview 
and introduction to the package please type: help(metafor).
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/SAMURAI/funnelplot.Rd_%03d_medium.png", width=480, height=480)
> ### Name: funnelplot
> ### Title: Funnel Plot
> ### Aliases: funnelplot
> ### Keywords: funnel plot meta-analysis sensitivity analysis
> 
> ### ** Examples
> 
> library(SAMURAI)
> 
> data(Hpylori)
> funnelplot(Hpylori, binary=TRUE, higher.is.better=FALSE, 
+   outlook="very negative")
> 
> data(greentea)
> funnelplot(greentea, binary=FALSE, higher.is.better=FALSE)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>