Learn R Programming

SAMURAI (version 1.2.1)

forestsens: Forest Plot for Sensitivity Analysis

Description

This function imputes missing effect sizes for unpublished studies and creates a forest plot. A set of forest plots can be generated for multiple imputations.

Usage

forestsens(table, binary = TRUE, mean.sd = FALSE, higher.is.better = FALSE, outlook = NA, all.outlooks = FALSE, rr.vpos = NA, rr.pos = NA, rr.neg = NA, rr.vneg = NA, smd.vpos = NA, smd.pos = NA, smd.neg = NA, smd.vneg = NA, level = 95, binary.measure = "RR", continuous.measure="SMD", summary.measure="SMD", method = "DL", random.number.seed = NA, sims = 10, smd.noise = 0.01, plot.title = "", scale = 1, digits = 3)

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".
all.outlooks
If TRUE, then a forest plot will be generated for each possible outlook.
rr.vpos
The user-defined relative risk for binary outcomes in unpublished studies with a "very positive" outlook.
rr.pos
The user-defined relative risk for binary outcomes in unpublished studies with a "positive" outlook.
rr.neg
The user-defined relative risk for binary outcomes in unpublished studies with a "negative" outlook.
rr.vneg
The user-defined relative risk for binary outcomes in unpublished studies with a "very negative" outlook.
smd.vpos
The user-defined standardized mean difference for continuous outcomes in unpublished studies with a "very positive" outlook.
smd.pos
The user-defined standardized mean difference for continuous outcomes in unpublished studies with a "positive" outlook.
smd.neg
The user-defined standardized mean difference for continuous outcomes in unpublished studies with a "negative" outlook.
smd.vneg
The user-defined standardized mean difference for continuous outcomes in 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.
plot.title
Main title of forest plot.
scale
Changes the scaling of fonts in the forest plot.
digits
The number of significant digits (decimal places) to appear in the table of summary results which appears if all.outlooks=TRUE.

Details

For unpublished studies with binary outcomes, random numbers are generated from binomial distributions to impute the number of events in the experimental arms of experimental studies. The parameter of these distributions depends out the outlook of the unpublished study and the rate of events in the control arms of published studies. By default, 10 simulations are run and their average is used to impute the number of events in the experimental arm.

For unpublished studies with continuous outcomes, a 'very good' approximator mentioned by Borenstein is used to impute the variance of the standardized mean difference. See Borenstein et al, 2009, pages 27-28.

References

Borenstein M, Hedges LV, Higgins JPT, and Rothstein HR (2009). Introduction to Meta-Analysis. Chichester UK: Wiley.

Cooper HC, Hedges LV, & Valentine JC, eds. (2009). The handbook of research synthesis and meta-analysis (2nd ed.). New York: Russell Sage Foundation.

DerSimonian R and Laird N (1986). "Meta-analysis in clinical trials." Controlled Clinical Trials 7:177-188 (1986).

Viechtbauer W (2010). Conducting meta-analyses in R with the metafor package. Journal of Statistical Software, 36(3), 1--48. http://www.jstatsoft.org/v36/i03/.

See Also

Hpylori, greentea

Examples

Run this code
library(SAMURAI)

data(Hpylori)
forestsens(Hpylori, binary=TRUE, higher.is.better=FALSE)
forestsens(Hpylori, binary=TRUE, higher.is.better=FALSE, plot.title="Test")
forestsens(Hpylori, binary=TRUE, higher.is.better=FALSE, random.number.seed=52)
forestsens(Hpylori, binary=TRUE, higher.is.better=FALSE, outlook="negative")
forestsens(Hpylori, binary=TRUE, higher.is.better=FALSE, all.outlooks=TRUE)

data(greentea)
forestsens(greentea, binary=FALSE, mean.sd=TRUE, higher.is.better=FALSE)
forestsens(greentea, binary=FALSE, mean.sd=TRUE, higher.is.better=FALSE,
  outlook="negative")
forestsens(greentea, binary=FALSE, mean.sd=TRUE, higher.is.better=FALSE,
  outlook="negative", smd.noise=0.3)

Run the code above in your browser using DataLab