Sets a list of parameters to use when generating a risk (proportion) difference column. Used as input to the
riskdiff parameter of tabulate_rsp_subgroups() and tabulate_survival_subgroups().
control_riskdiff(
arm_x = NULL,
arm_y = NULL,
format = "xx.x (xx.x - xx.x)",
col_label = "Risk Difference (%) (95% CI)",
pct = TRUE
)(string)
name of reference arm to use in risk difference calculations.
(character)
names of one or more arms to compare to reference arm in risk difference
calculations. A new column will be added for each value of arm_y.
(string or function)
the format label (string) or formatting function to apply to the risk
difference statistic. See the 3d string options in formatters::list_valid_format_labels() for possible format
strings. Defaults to "xx.x (xx.x - xx.x)".
(character)
labels to use when rendering the risk difference column within the table.
If more than one comparison arm is specified in arm_y, default labels will specify which two arms are
being compared (reference arm vs. comparison arm).
(flag)
whether output should be returned as percentages. Defaults to TRUE.
A list of items with names corresponding to the arguments.
control_riskdiff()
#> $arm_x
#> NULL
#>
#> $arm_y
#> NULL
#>
#> $format
#> [1] "xx.x (xx.x - xx.x)"
#>
#> $col_label
#> [1] "Risk Difference (%) (95% CI)"
#>
#> $pct
#> [1] TRUE
#>
control_riskdiff(arm_x = "ARM A", arm_y = "ARM B")
#> $arm_x
#> [1] "ARM A"
#>
#> $arm_y
#> [1] "ARM B"
#>
#> $format
#> [1] "xx.x (xx.x - xx.x)"
#>
#> $col_label
#> [1] "Risk Difference (%) (95% CI)"
#>
#> $pct
#> [1] TRUE
#>