Skip to content

Instantly share code, notes, and snippets.

@nievergeltlab
Last active February 14, 2017 20:15
Show Gist options
  • Save nievergeltlab/0e4e474e33f8ecf70d4b4386c865b323 to your computer and use it in GitHub Desktop.
Save nievergeltlab/0e4e474e33f8ecf70d4b4386c865b323 to your computer and use it in GitHub Desktop.
Forest plot for meta-analysis in R
library(metafor)
y <- scan(what=numeric())
0.273936
0.278002
0.117789
0.170343
se <- scan(what=numeric())
0.0864617
0.0667362
0.219637
0.0783422
meta_analysis <- rma(y,se^2,method="FE")
forest.rma(meta_analysis,xlab="Beta for Interpersonal Trauma Count", slab=c("GSD","MRS","ONG","NHS"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment