Questions tagged [r-forestplot]

Forest plot is a graph used in statistics that shows both estimates and confidence intervals. The forestplot package in R is a package for creating these.

Forest plots , sometimes also referred to as blobbogram, date back to 1970s and are most frequently seen in meta-analysis, but are in no way restricted to these.

Forest plots show the information from the individual studies that went into the meta-analysis at a glance. They show the amount of variation between the studies and an estimate of the overall result

The forestplot package is all about providing these in R. It originated form the 'rmeta'-package's forestplot function with lots of additional functionality.

References:

Forest plots: trying to see the wood and the trees S Lewis, M Clarke Bmj 322 (7300), 1479-1480 link

forestplot vignette: https://cran.r-project.org/web/packages/forestplot/vignettes/forestplot.html

264 questions
6
votes
2 answers

Color coding error bars in a plotly scatter plot

I'm trying to create a forest plot with R plotly where I want to color code the effect sizes (points) and their error bars by their corresponding p-values. Here are toy data: set.seed(1) factors <- paste0(1:25,":age") effect.sizes <-…
dan
  • 6,048
  • 10
  • 57
  • 125
5
votes
3 answers

Forest plot with table ggplot coding

I am trying to get a table side by side with my forest plot but I am having a lot of trouble doing so. I am able to make a forest plot with the following…
davidk
  • 133
  • 2
  • 11
5
votes
1 answer

Need help modifying forest plot code in R

I'm trying to make a forest plot in R using the meta::forest() function, and am having formatting issues when trying to change the left columns. The overall effect statistics disappear, and the 'author' column becomes centre aligned. Here is an…
lhan
  • 51
  • 3
4
votes
0 answers

How to draw a forest plot for coxph considering subject ids in R?

I am trying to draw a forest plot for the results of cox model with repeated measures considering subjects ids; here is a part of my big data; data <- read.table(header=TRUE, text=" Id start end QS Age Event 01 0 70 1 25 …
Katie
  • 119
  • 1
  • 7
4
votes
0 answers

Create a forest plot for weighted mean effect size for each study in meta-analysis

I am conducting a meta-analysis using the robust variance estimation (RVE) technique due to the fact that each study contains multiple effect sizes. In my case, effect sizes are r (linear association). After extensive online research, I decided to…
4
votes
1 answer

Forest plot in ggplot2

I am trying to create a forestplot as found here. label <- c("X1","X2","X3", "X4", "X5","X6", "X7") mean <- c(1.09,1.22,1.15,1.13,1.10,1.19, 1.12) lower <- c(1.07,1.19,1.13,1.11,1.01,1.00, 1.07) upper <- c(1.11,1.24,1.18,1.15,1.20,1.40, 1.17) df…
epiNS
  • 353
  • 2
  • 7
4
votes
1 answer

Adding Labels in Scientific Notation to Forest Plots Using the metafor package

So I'm doing a meta-analysis using the meta.for package in R. I am preparing figures for publication in a scientific journal and i would like to add p-values to my forest plots but with scientific annotation formatted as x10-04 rather than standard…
4
votes
1 answer

How do you add a footnote if you are using the forestplot R package?

Please forgive the naïve question as I am new to R. I have generated a forest plot using a code that I saw and adapted on R bloggers. I would like to add a footnote but I'm not sure how to do it. I've seen different codes but I don't know which one…
Christina
  • 41
  • 2
3
votes
2 answers

Survminer - ggforest, how to change variable names?

Hello to everybody and thank you for your help. I'm managing to build a forest plot of a Cox model with the Survminer package, however, I've got stuck in trying to change the labels of the variables displayed. Is there a way to change the labels…
Lorenzo
  • 33
  • 3
3
votes
0 answers

I keep getting the error "..." is not a graphical parameter?

I am trying to create a forest plot in R using the forest() function from the metafor package. I refer to the documentation on R's website for all of the arguments that I can add to this function. Currently this is my code: forest(dat.back$yi,…
aspire94
  • 131
  • 1
  • 3
3
votes
2 answers

Changing the font size of x-axis labels in forestplot R function

I am generating a forest plot in R using the following code: forestplot(livertabletext, liverdata,new_page = TRUE, is.summary=c(TRUE,rep(FALSE,3),TRUE), clip=c(0.1,2.0), xlog=TRUE, …
Keno
  • 133
  • 2
  • 10
3
votes
1 answer

How to squeeze rows together in forestplot using forestplot package in R

I'm making a forest plot using the forestplot package in R. I have a lot of white space between the rows in my plot. How can I remove the space, or squeeze the rows together, to make a neater smaller graph? Many thanks. library(forestplot) main5 <-…
user2363642
  • 727
  • 9
  • 26
3
votes
1 answer

Adding gaps in data for forest plot in metafor

I'm new to R and working on creating a forest plot with a data set using the metafor package's forest.default implementation ( I only have the x, ci.ub and ci.ub in the data for the forest plot) I'm almost done and my plot looks similar to this,…
rushsangs
  • 116
  • 1
  • 8
3
votes
1 answer

forestplot has unusually large blue dot in graph

Im trying to create a forestplot, but the last row has a giant blue dot, instead of the small dot the other rows have. Any idea how to fix this? these vignettes are what Ive been using to create my code so far. My only thought is that the giant dot…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
2
votes
1 answer

Add different labels in forest plot based on the cut-off line

I need to add two labels in my forest plot (I'm using the forestplot package) to distinguish the group below (No) from the group above (Yes) the cut-off line at 1. Here are the data library(forestplot) dataout variables mean lower…
cliu
  • 933
  • 6
  • 13
1
2 3
17 18