Skip to content

Commit

Permalink
distinguish between pax and rem
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda Nab committed Nov 13, 2023
1 parent 07841c5 commit 3a00d1a
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions analysis/data_import/calc_n_excluded.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,26 @@ calc_n_excluded <- function(data_processed){
filter(status_all %in% c("covid_hosp", "noncovid_hosp") &
fu_all == 0) %>%
nrow()
n_treated_pax_rem <-
n_treated_rem <-
data_processed %>%
filter(treated_sot_mol_same_day == 0) %>%
filter(!(status_all %in% c("covid_hosp", "noncovid_hosp") &
fu_all == 0)) %>%
filter(!is.na(remdesivir_covid_therapeutics) & is.na(paxlovid_covid_therapeutics)) %>%
nrow()
n_treated_pax <-
data_processed %>%
filter(treated_sot_mol_same_day == 0) %>%
filter(!(status_all %in% c("covid_hosp", "noncovid_hosp") &
fu_all == 0)) %>%
filter(!is.na(paxlovid_covid_therapeutics) |
!is.na(remdesivir_covid_therapeutics)) %>%
filter(!is.na(paxlovid_covid_therapeutics) & is.na(remdesivir_covid_therapeutics)) %>%
nrow()
n_treated_rem_and_pax <-
data_processed %>%
filter(treated_sot_mol_same_day == 0) %>%
filter(!(status_all %in% c("covid_hosp", "noncovid_hosp") &
fu_all == 0)) %>%
filter(!is.na(paxlovid_covid_therapeutics) & !is.na(remdesivir_covid_therapeutics)) %>%
nrow()
n_after_exclusion_processing <-
data_processed %>%
Expand All @@ -34,6 +47,8 @@ calc_n_excluded <- function(data_processed){
out <- tibble(n_before_exclusion_processing,
n_treated_same_day,
n_hospitalised_pos_test,
n_treated_pax_rem,
n_treated_rem,
n_treated_pax,
n_treated_rem_and_pax,
n_after_exclusion_processing)
}

0 comments on commit 3a00d1a

Please sign in to comment.