-
-
Notifications
You must be signed in to change notification settings - Fork 560
Add weights to Kaplan Meier #396
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
Comments
No, not atm, but there should be. All the pieces are in place for it. I'll add it to v0.14 release. |
One item I wanted to add to this, the SE estimates from a weighed Kaplan-Meier are invalid. If confidence_intervals_ are requested on a weighted KM, an error or warning should be given to users. Currently , the only option I am aware of for CI for a weighted KM is non-parametric bootstrapping |
Huh, interesting, can you explain why they are invalid? Any docs you recommend I read? |
This might be my bad. It depends on the way the weights are generated. I am using inverse probability weights. Variances are invalid in this specific situations, since there is some residual correlations in the weights since they are generated via regression models. When using inverse probability weighted data, you need to use a robust variance estimator to account for these dependencies. As far as I know, there is not a version for Greenwood's variance for KM. If you would like a source that discusses this specific issue somewhat: http://onlinelibrary.wiley.com/doi/10.1002/sim.7084/full |
Thanks for the advice. For now, I've included a warning to the user when they are using non-integer weights (the other use case - pre-aggregating subjects to make your dataset smaller - is valid however). |
Is there a way to add weights to individual observation in KaplanMeierFitter().fit()? This is useful for inverse probability censor weights.
For IPCW, logistic regression is used to generate probabilities of individuals being censored by a set of dependent variables (where the independent variable is censor=1). The inverse of the predicted probability is then used to weight observations.
I am currently looking up how SAS generates the weighted Kaplan Meier
The text was updated successfully, but these errors were encountered: