RSPT01
Binary Outcomes Summary
rspt01.Rd
RSPT01
template may be used to summarize any binary outcome or response variable at
a single time point. Typical application for oncology
Usage
rspt01_main(
adam_db,
dataset = "adrs",
arm_var = "ARM",
ref_group = NULL,
odds_ratio = TRUE,
perform_analysis = "unstrat",
strata = NULL,
conf_level = 0.95,
methods = list(),
...
)
rspt01_pre(adam_db, ...)
rspt01_post(tlg, prune_0 = TRUE, ...)
rspt01
Arguments
- adam_db
(
list
ofdata.frames
) object containing theADaM
datasets- dataset
(
string
) the name of a table in theadam_db
object.- arm_var
(
string
) variable used for column splitting- ref_group
(
string
) The name of the reference group, the value should be identical to the values inarm_var
, if not specified, it will by default use the first level or value ofarm_var
.- odds_ratio
(
flag
) should the odds ratio be calculated, default isTRUE
- perform_analysis
(
string
) option to display statistical comparisons using stratified analyses, or unstratified analyses, or both, e.g.c("unstrat", "strat")
. Only unstratified will be displayed by default- strata
(
string
) stratification factors, e.g.strata = c("STRATA1", "STRATA2")
, by default as NULL- conf_level
(
numeric
) the level of confidence interval, default is 0.95.- methods
(
list
) a named list, use a named list to control, for example:methods = list(prop_conf_method = "wald", diff_conf_method = "wald", strat_diff_conf_method = "ha", diff_pval_method = "fisher", strat_diff_pval_method = "schouten")
prop_conf_method
controls the methods of calculating proportion confidence interval,diff_conf_method
controls the methods of calculating unstratified difference confidence interval,strat_diff_conf_method
controls the methods of calculating stratified difference confidence interval,diff_pval_method
controls the methods of calculating unstratified p-value for odds ratio,strat_diff_pval_method
controls the methods of calculating stratified p-value for odds ratio, see more details intern
- ...
not used.
- tlg
(
TableTree
,Listing
orggplot
) object typically produced by amain
function.- prune_0
(
flag
) remove 0 count rows
Functions
rspt01_main()
: Main TLG functionrspt01_pre()
: Preprocessingrspt01_post()
: Postprocessing
Examples
library(dplyr)
library(dunlin)
proc_data <- log_filter(syn_data, PARAMCD == "BESRSPI", "adrs")
run(rspt01, proc_data)
#> Warning: Chi-squared approximation may be incorrect
#> Warning: Chi-squared approximation may be incorrect
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ——————————————————————————————————————————————————————————————————————————————————————————————
#> Responders 133 (99.3%) 127 (94.8%) 131 (99.2%)
#> 95% CI (Wald, with correction) (97.4, 100.0) (90.6, 98.9) (97.4, 100.0)
#> Unstratified Analysis
#> Difference in Response rate (%) -4.5 -0.0
#> 95% CI (Wald, with correction) (-9.3, 0.3) (-2.8, 2.8)
#> p-value (Chi-Squared Test) 0.0313 0.9915
#> Odds Ratio (95% CI) 0.14 (0.02 - 1.12) 0.98 (0.06 - 15.91)
#> Complete Response (CR) 119 (88.8%) 97 (72.4%) 120 (90.9%)
#> 95% CI (Wald, with correction) (83.09, 94.52) (64.45, 80.33) (85.63, 96.19)
#> Partial Response (PR) 14 (10.4%) 30 (22.4%) 11 (8.3%)
#> 95% CI (Wald, with correction) (4.90, 16.00) (14.96, 29.82) (3.24, 13.43)
#> Stable Disease (SD) 1 (0.7%) 7 (5.2%) 1 (0.8%)
#> 95% CI (Wald, with correction) (0.00, 2.58) (1.08, 9.36) (0.00, 2.62)
run(rspt01, proc_data,
odds_ratio = FALSE, perform_analysis = c("unstrat", "strat"),
strata = c("STRATA1", "STRATA2"), methods = list(diff_pval_method = "fisher")
)
#> A: Drug X B: Placebo C: Combination
#> (N=134) (N=134) (N=132)
#> ———————————————————————————————————————————————————————————————————————————————————————————
#> Responders 133 (99.3%) 127 (94.8%) 131 (99.2%)
#> 95% CI (Wald, with correction) (97.4, 100.0) (90.6, 98.9) (97.4, 100.0)
#> Unstratified Analysis
#> Difference in Response rate (%) -4.5 -0.0
#> 95% CI (Wald, with correction) (-9.3, 0.3) (-2.8, 2.8)
#> p-value (Fisher's Exact Test) 0.0662 1.0000
#> Stratified Analysis
#> Difference in Response rate (%) -4.4 0.1
#> 95% CI (CMH, without correction) (-8.5, -0.3) (-2.2, 2.3)
#> p-value (Cochran-Mantel-Haenszel Test) 0.0344 0.9560
#> Complete Response (CR) 119 (88.8%) 97 (72.4%) 120 (90.9%)
#> 95% CI (Wald, with correction) (83.09, 94.52) (64.45, 80.33) (85.63, 96.19)
#> Partial Response (PR) 14 (10.4%) 30 (22.4%) 11 (8.3%)
#> 95% CI (Wald, with correction) (4.90, 16.00) (14.96, 29.82) (3.24, 13.43)
#> Stable Disease (SD) 1 (0.7%) 7 (5.2%) 1 (0.8%)
#> 95% CI (Wald, with correction) (0.00, 2.58) (1.08, 9.36) (0.00, 2.62)