plotForest | R Documentation |
Forest plot of coefficients
plotForest(beta, stders)
beta |
regression coefficients from each analysis |
stders |
standard errors corresponding to betas |
Forest plot of effect sizes and standard errors
# Generate effects
library(mvtnorm)
library(clusterGeneration )
n = 4
Sigma = cov2cor(genPositiveDefMat(n)$Sigma)
beta = t(rmvnorm(1, rep(0, n), Sigma))
stders = rep(.1, n)
# set names
rownames(Sigma) = colnames(Sigma) = LETTERS[1:n]
rownames(beta) = names(stders) = LETTERS[1:n]
# Run random effects meta-analysis,
# account for correlation
RE2C( beta, stders, Sigma)
# Make plot
plotForest( beta, stders )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.