Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot specify confidence interval width of simulation summary invpc_tte #102

Open
atredennick opened this issue Jan 17, 2025 · 0 comments

Comments

@atredennick
Copy link

The confidence interval calculated over the Kaplan-Meier curves estimated from simulated data is currently fixed at 90% (0.05 and 0.95 quantiles of KM curves from simulated data). From the vpc_tte function code starting on line 211:

sim_km <- all_dat %>%
      dplyr::group_by(strat, bin) %>%
      dplyr::summarise (bin_mid = head(bin_mid,1),
                 bin_min = head(bin_min,1),
                 bin_max = head(bin_max,1),
                 qmin = quantile(surv, 0.05),
                 qmax = quantile(surv, 0.95),
                 qmed = median(surv),
#                         lower_med = median(lower, 0.05),
#                         upper_med = median(upper, 0.05),
                 step = 0)

This can also lead to confusion where a user might think that specifying ci = c(0.025, 0.975) in the arguments would lead to a different CI, but if in fact does not. In fact, the ci argument in this function applies to the Kaplan-Meier estimate from the observed data, which one only observes when show = list(obs_ci = TRUE) is specified.

Would it be possible to pass a new argument like ci_sim as a vector to the summarizing function of the sim_km object such that the user can specify any CI of choice? Thanks for considering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant