diff --git a/tests/testthat/_snaps/table_ratet01.md b/tests/testthat/_snaps/table_ratet01.md index 0b73ce09..5b82c881 100644 --- a/tests/testthat/_snaps/table_ratet01.md +++ b/tests/testthat/_snaps/table_ratet01.md @@ -25,4 +25,10 @@ Rate Ratio 1.1615 1.3973 Rate Ratio CI (0.6462, 2.0877) (0.7789, 2.5067) p value 0.6169 0.2619 + Adjusted (NB) exacerbation rate (per year) + Rate 2.7374 2.8150 2.9789 + Rate CI (2.3932, 3.1311) (2.4681, 3.2106) (2.6152, 3.3932) + Rate Ratio 1.0283 1.0882 + Rate Ratio CI (0.8856, 1.1941) (0.9381, 1.2624) + p value 0.7140 0.2643 diff --git a/tests/testthat/test-table_ratet01.R b/tests/testthat/test-table_ratet01.R index a39dd314..cd9f5546 100644 --- a/tests/testthat/test-table_ratet01.R +++ b/tests/testthat/test-table_ratet01.R @@ -35,7 +35,21 @@ testthat::test_that("RATET01 is produced correctly", { distribution = "quasipoisson", rate_mean_method = "ppmeans", var_labels = "Adjusted (QP) exacerbation rate (per year)", - table_names = "adj", + table_names = "adj-qp", + .stats = c("rate", "rate_ci", "rate_ratio", "rate_ratio_ci", "pval"), + .labels = c( + rate = "Rate", rate_ci = "Rate CI", rate_ratio = "Rate Ratio", + rate_ratio_ci = "Rate Ratio CI", pval = "p value" + ) + ) %>% + summarize_glm_count( + vars = "AVAL", + variables = list(arm = "ARM", offset = "lgTMATRSK", covariates = c("REGION1")), + conf_level = 0.95, + distribution = "negbin", + rate_mean_method = "emmeans", + var_labels = "Adjusted (NB) exacerbation rate (per year)", + table_names = "adj-nb", .stats = c("rate", "rate_ci", "rate_ratio", "rate_ratio_ci", "pval"), .labels = c( rate = "Rate", rate_ci = "Rate CI", rate_ratio = "Rate Ratio",