Prepare Forest plot data for continuous outcomes

prepare_cont_benefits_data(
  data,
  change_ref = c("Y", "N"),
  ci_method = c("Supplied", "Calculated")
)

Arguments

data

(data.frame) Effects table

change_ref

Change reference group ("Y" or "N)

ci_method

(character) confidence interval method, either Supplied (taken from the effect table) or Calculated (calculated within the program).

Examples

forest_plot_src <- subset(effects_table, !is.na(Mean1))
forest_plot_data <- prepare_cont_benefits_data(
  forest_plot_src,
  "N",
  "Calculated"
)
#> [2024-08-28 08:20:52] >
#> CI for treatment difference in continuous outcomes is calculated
#> [2024-08-28 08:20:52] > Prepare Forest plot data for continuous outcomes
head(forest_plot_data)
#> $dot_data_benefit_c
#>    rate treatment       type  factor            outcome group
#> 1    65    Drug A Continuous Benefit Secondary Efficacy     1
#> 2    60    Drug A Continuous Benefit HR Quality of Life     2
#> 3    50    Drug B Continuous Benefit Secondary Efficacy     3
#> 4    58    Drug B Continuous Benefit HR Quality of Life     4
#> 5    57    Drug C Continuous Benefit Secondary Efficacy     5
#> 6    45    Drug C Continuous Benefit HR Quality of Life     6
#> 7    40    Drug D Continuous Benefit Secondary Efficacy     7
#> 8    55    Drug D Continuous Benefit HR Quality of Life     8
#> 9    20   Placebo Continuous Benefit Secondary Efficacy     1
#> 10    9   Placebo Continuous Benefit HR Quality of Life     2
#> 11   14   Placebo Continuous Benefit Secondary Efficacy     3
#> 12    9   Placebo Continuous Benefit HR Quality of Life     4
#> 13   18   Placebo Continuous Benefit Secondary Efficacy     5
#> 14   12   Placebo Continuous Benefit HR Quality of Life     6
#> 15   16   Placebo Continuous Benefit Secondary Efficacy     7
#> 16    7   Placebo Continuous Benefit HR Quality of Life     8
#> 
#> $forest_data_benefit_c
#>   treatment       type  factor            outcome diff       se    lower
#> 1    Drug A Continuous Benefit Secondary Efficacy   45 2.055480 40.96889
#> 2    Drug A Continuous Benefit HR Quality of Life   51 1.914158 47.24605
#> 3    Drug B Continuous Benefit Secondary Efficacy   36 1.564609 32.93156
#> 4    Drug B Continuous Benefit HR Quality of Life   49 1.847431 45.37691
#> 5    Drug C Continuous Benefit Secondary Efficacy   39 1.802776 35.46448
#> 6    Drug C Continuous Benefit HR Quality of Life   33 1.420211 30.21475
#> 7    Drug D Continuous Benefit Secondary Efficacy   24 1.472753 21.11171
#> 8    Drug D Continuous Benefit HR Quality of Life   48 1.592482 44.87690
#>      upper group
#> 1 49.03111     1
#> 2 54.75395     2
#> 3 39.06844     3
#> 4 52.62309     4
#> 5 42.53552     5
#> 6 35.78525     6
#> 7 26.88829     7
#> 8 51.12310     8
#>