View source: R/tkonfound_fig.R
tkonfound_fig | R Documentation |
This function generates plots illustrating how the change in effect size is influenced by switching or replacing outcomes in a 2x2 table. It produces two plots: one showing all possibilities (switching) and another zoomed in the area for positive RIR (Relative Impact Ratio).
tkonfound_fig(
a,
b,
c,
d,
thr_p = 0.05,
switch_trm = TRUE,
test = "fisher",
replace = "control"
)
a |
Number of cases in the control group with unsuccessful outcomes. |
b |
Number of cases in the control group with successful outcomes. |
c |
Number of cases in the treatment group with unsuccessful outcomes. |
d |
Number of cases in the treatment group with successful outcomes. |
thr_p |
P-value threshold for statistical significance, default is 0.05. |
switch_trm |
Whether to switch the two cells in the treatment or control row, default is TRUE (treatment row). |
test |
Type of statistical test used, either "Fisher's Exact Test" (default) or "Chi-square test". |
replace |
Indicates whether to use the entire sample or just the control group for calculating the base rate, default is "control". |
Returns two plots showing the effect of hypothetical case switches on the effect size in a 2x2 table.
tkonfound_fig(14, 17, 6, 25, test = "chisq")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.