Skip to content

Commit

Permalink
Revert RATET01 updates (temporarily) (#197)
Browse files Browse the repository at this point in the history
Closes #196

---------

Co-authored-by: shajoezhu <sha.joe.zhu@gmail.com>
  • Loading branch information
edelarua and shajoezhu authored Jan 27, 2024
1 parent 7a1d706 commit fd87c92
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 87 deletions.
60 changes: 1 addition & 59 deletions book/tables/efficacy/ratet01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ subtitle: Event Rate Summary for Recurrent Events

------------------------------------------------------------------------

{{< include ../../test-utils/envir_hook.qmd >}}

This example will focus on data from a single visit "WEEK 1 DAY 8" and a single endpoint "FKSI-FWB".
Only evaluable populations will be analyzed.

Expand All @@ -31,65 +29,9 @@ anl <- df_explicit_na(anl)
## Customized Table

```{r variant1, test = list(result_v1 = "result")}
lyt <- basic_table(show_colcounts = TRUE) %>%
split_cols_by("ARM", ref_group = "B: Placebo", split_fun = ref_group_position("first")) %>%
analyze_vars(
"AVAL_f",
var_labels = "Number of exacerbations per patient",
.stats = c("count_fraction"),
.formats = c("count_fraction" = "xx (xx.xx%)"),
.label = c("Number of exacerbations per patient")
) %>%
summarize_glm_count(
vars = "AVAL",
variables = list(arm = "ARM", offset = "lgTMATRSK", covariates = NULL),
conf_level = 0.95,
distribution = "poisson",
rate_mean_method = "emmeans",
var_labels = "Unadjusted exacerbation rate (per year)",
table_names = "unadj",
.stats = c("rate"),
.labels = c(rate = "Rate")
) %>%
summarize_glm_count(
vars = "AVAL",
variables = list(arm = "ARM", offset = "lgTMATRSK", covariates = c("REGION1")),
conf_level = 0.95,
distribution = "quasipoisson",
rate_mean_method = "ppmeans",
var_labels = "Adjusted (QP) exacerbation rate (per year)",
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",
rate_ratio_ci = "Rate Ratio CI", pval = "p value"
)
)
result <- build_table(
lyt = lyt,
df = anl
)
result
# Under development
```

{{< include ../../test-utils/save_results.qmd >}}

## `teal` App

```{r teal, message=FALSE, opts.label=c('skip_if_testing', 'app')}
Expand Down
28 changes: 0 additions & 28 deletions package/tests/testthat/_snaps/ratet01/markdown-snaps.md

This file was deleted.

0 comments on commit fd87c92

Please sign in to comment.