-
Notifications
You must be signed in to change notification settings - Fork 5
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
Confidence bands for absolute risks in competing-risk setting #154
Comments
In the most recent version of casebase (v.0.10.3), I calculate confidence bands for absolute risks in the single-event setting.But the function"confint.absRiskCB" cannot be found. I just want to know how to calculate confidence bands for absolute risks in r package casebase.Thank you |
@hejunhuicomeon Can you please provide a minimal reproducible example? Because for me the library(casebase)
#> See example usage at http://sahirbhatnagar.com/casebase/
library(survival)
fit <- fitSmoothHazard(DeadOfPrCa ~ pspline(Follow.Up.Time, df = 2) * ScrArm,
data = ERSPC, ratio = 10)
#> 'Follow.Up.Time' will be used as the time variable
new_data <- data.frame(ScrArm = c("Control group",
"Screening group"))
new_time <- seq(0, 14, by = 0.1)
risk <- absoluteRisk(fit, time = new_time,
newdata = new_data)
conf_ints <- confint(risk, fit)
head(conf_ints)
#> time estimate conf.low conf.high cov_prof
#> 1 0.0 0.000000e+00 0.000000e+00 0.000000e+00 Control group
#> 2 0.1 2.550557e-06 3.751504e-07 1.528747e-05 Control group
#> 3 0.2 5.185857e-06 8.319090e-07 2.758015e-05 Control group
#> 4 0.3 7.933361e-06 1.458696e-06 3.787632e-05 Control group
#> 5 0.4 1.082208e-05 2.282062e-06 4.620604e-05 Control group
#> 6 0.5 1.388317e-05 3.343530e-06 5.463520e-05 Control group Created on 2023-08-03 with reprex v2.0.2 |
@turgeonmaxime Thank you sooooo much for your patient response.
Second : It works ! The reason for my mistake is that other covariates were included in the model when calculating the absolute risk for the exposed group and the control group.
Is there something wrong in my understanding ? Thank you for taking the time to read and answer my questions. |
Finally, we don't currently support confidence bands for absolute risks computed using a competing risk model. It is on our roadmap to eventually support it, but we don't have a clear timeline yet. |
@turgeonmaxime I understand, thank you so much for your patient response! |
In the most recent version of casebase (v.0.10.1), we introduced confidence bands for absolute risks in the single-event setting. Our approach is based on approximate Bayesian inference, and its validity relies on the asymptotic normality of the case-base estimator.
The same approach is valid for competing risks, as will be shown in an upcoming paper. We should implement it in the package. I expect the implementation to be similar to the single-event setting.
Minor point: at the same time, we can make sure that the user can pass the arguments from
absRisk
toconfint
. For example,method = "montecarlo"
.The text was updated successfully, but these errors were encountered: