ggforestplot - plot forestplot with Cohen's d and 95% CI

Viewed 286

Could someone help me to prepare a forestplot using the ggforestplot package, on which I would like to show the Cohen d effect size and the corresponding confidence interval [+ -95% CI]. I chose ggforestplot because I like the chart patterns. Unfortunately, I can not enter my data, the program calculates itself. While it is possible to enter the effect size, the confidence interval is calculated from the standard error, and therefore it is not CI. Below I present part od the data.

library(ggforestplot)

my_data <- data.frame(
  name = c("NN (s) 20m", "NN (s) 20m", "RR (s) 20m", "RR (s) 20m", "KR (s) 20m", "KR (s) 20m"),
  subgrup = c("Female", "Male", "Female", "Male", "Female", "Male"),
  es = c(1.41, 1.06, 0.67, 0.23, 0.98, 0.81),
  se = c(0.8, 0.28, 0.27, 0.1, 0.2, 0.15),
  low = c(0.48, 0.67, 0.21, -0.03, 0.45, 0.47),
  up = c(2.9, 1.86, 1.4, 0.58, 1.9, 1.47),
  pvalue = c(0.01, 0.0003, 0.02, 0.13, 0.008, 0.02)
)


forestplot(
  df = my_data,
  estimate = es,
  se = se,
  logodds = FALSE,
  pvalue = pvalue,
  colour = subgrup,
  shape = subgrup,
  title = "Forestplot",
  xlab = "Effect Sizie with 95% CI",
  # xlim = c(0.5, 2.2),
  # You can explicitly define x-tick breaks
  xtickbreaks = c(-2.5, -2, -1.5, -1, -0.5, .5, 1, 1.5, 2.0, 2.5)
)
0 Answers
Related