Skip to content

Commit

Permalink
save second censoring models
Browse files Browse the repository at this point in the history
  • Loading branch information
Linda Nab committed Nov 22, 2023
1 parent 232e66d commit 67ce45d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion analysis/ccw.R
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,8 @@ if (model == "cox"){
if (period == "ba1" & contrast == "all"){ # no start of alternative treatments by design
data_trt_long <-
data_trt_long %>%
mutate(p_uncens2_plr = 1)}
mutate(p_uncens2_plr = 1)
model_cens2_trt <- "no alternative censoring"}
else{
data_trt_long_grace <-
data_trt_long %>%
Expand Down
8 changes: 4 additions & 4 deletions analysis/data_ccw/dens_weights.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if(length(args)==0){
period <- "ba1"
contrast <- "all"
outcome <- "primary"
model <- "cox"
model <- "plr"
subgrp <- "full"
supp <- "main"
} else {
Expand Down Expand Up @@ -106,11 +106,11 @@ hist <- map(.x = arms,
q_s <-
data_long %>%
group_by(arm, fup) %>%
summarise(tibble::enframe(quantile(cmlp_uncens, probs = c(0, 0.025, 0.05, 0.95, 0.975, 1)),
name = "quantile", "cmlp_uncens"),
summarise(tibble::enframe(quantile(cmlp_uncens * cmlp_uncens2, probs = c(0, 0.025, 0.05, 0.95, 0.975, 1)),
name = "quantile", "cmlp_uncens_prod"),
.groups = "keep") %>%
mutate(quantile = str_remove(quantile, pattern = "%")) %>%
pivot_wider(values_from = cmlp_uncens,
pivot_wider(values_from = cmlp_uncens_prod,
names_from = quantile,
names_prefix = "q_")
q_w_s <-
Expand Down
2 changes: 1 addition & 1 deletion project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1064,7 +1064,7 @@ actions:
highly_sensitive:
data: output/plr/data/data_long_all_plr.feather
model01: output/plr/models/plr_cens_control_all_plr.rds
model02: output/plr/models/plr_cens_trt_all_plr.rds
model02: output/plr/models/plr_cens*_trt_all_plr.rds
model1: output/plr/models/km_trt_all_plr.rds
model2: output/plr/models/km_control_all_plr.rds
model3: output/plr/models/cox_w_all_plr.rds
Expand Down

0 comments on commit 67ce45d

Please sign in to comment.