You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The only plot type supporting censored data currently is ppc_km_overlay (plus _grouped), which plots overlaid Kaplan-Meier plots, which is an excellent idea. Other plots can be useful, too, and we can provide a generic approach by considering the censored data as missing data, and generate imputed y.
Here's a simple code for the imputation (which doesn't check that the sample gets a non-zero number of draws)
Without imputation, the plot doesn't make sense as discussed before. With imputation, the plot makes sense but also reveals there is a group of observation with similar indices (likely to be from the same sub-study).
Imputed y can be used with any plot, even with the `ppc_km_overlay´ just to illustrate that the imputation is not breaking anything (but otherwise, it's better to show km-plot without imputation)
bayesplot functions take y and yrep as arguments, and thus the imputation would be made by the user, or by rstanarm or brms. I'm adding this issue, as we could add to bayesplot functions an argument that indicates which elements of y are imputed, and the imputed y values would be shown in a different color to help to see how much the imputation is affecting. This would work also in km and pit_ecdf plots, where the curves would have more and more imputed color when going right.
The text was updated successfully, but these errors were encountered:
The only plot type supporting censored data currently is
ppc_km_overlay
(plus_grouped
), which plots overlaid Kaplan-Meier plots, which is an excellent idea. Other plots can be useful, too, and we can provide a generic approach by considering the censored data as missing data, and generate imputedy
.Here's a simple code for the imputation (which doesn't check that the sample gets a non-zero number of draws)
and then showing plots without imputation and with imputation
Without imputation, the plot doesn't make sense as discussed before. With imputation, the plot makes sense but also reveals there is a group of observation with similar indices (likely to be from the same sub-study).
Imputed y can be used with any plot, even with the `ppc_km_overlay´ just to illustrate that the imputation is not breaking anything (but otherwise, it's better to show km-plot without imputation)
bayesplot functions take y and yrep as arguments, and thus the imputation would be made by the user, or by rstanarm or brms. I'm adding this issue, as we could add to bayesplot functions an argument that indicates which elements of y are imputed, and the imputed y values would be shown in a different color to help to see how much the imputation is affecting. This would work also in km and pit_ecdf plots, where the curves would have more and more imputed color when going right.
The text was updated successfully, but these errors were encountered: