Change Text within ggplot Object using forester package

50 Views Asked by At

I am trying to make a table of odds ratios using the forester package. MTX is my "referent" category, so I want it to have an OR of 1 and no confidence intervals.

To do that I'm assigning it a value of "1" for the "Estimate" paramater. This works great for the forest plot, but then the "Estimate" column is messed up (It should just read "Referent")

Any advice for how to do this? Here is the code and what the chart looks like right now:

prev_cox
# A tibble: 5 × 6
  Strategy                        `exp(coef)` `lower .95` `upper .95` Events Incidence
  <chr>                                 <dbl>       <dbl>       <dbl>  <dbl> <chr>    
1 "Prevalent Cardiac Sarcoidosis"      NA          NA           NA        NA  NA      
2 "   MTX"                              1           1            1        36 "104"    
3 "   MMF"                              1.65        0.672        4.05     31 "234"    
4 "   AZA"                              2.31        0.881        6.08      8 "121"    
5 "   TNF Upfront"                      0.601       0.118        3.07      4 " 90"    


forester(
  left_side_data = prev_cox[,c(1,5,6)], 
  estimate = prev_cox$`exp(coef)`, 
  ci_low = prev_cox$`lower .95`, 
  ci_high = prev_cox$`upper .95`, 
  display = TRUE, 
  xlim = c(0.09, 8), 
  xbreaks = c(0.09, 1, 5), 
  null_line_at = 1,  
  x_scale_linear = FALSE, 
  font_family = "sans", 
  stripe_colour = "#eff3f2"
)

enter image description here

0

There are 0 best solutions below