-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Different behavior of confidence bands in ggcoxzph compared to plot.cox.zph #444
Comments
thank you for reporting this; |
Hello, |
This has not been corrected yet. |
This is an important issue and would appreciate a fix. Thanks. |
Running into similar issue, hope this will be fixed soon |
Has anyone found an easy work around, meanwhile they fix it? |
@kassambara |
Use plot.cox.zph instead. |
Temporary fix: Also, pending PR: |
Hello,
I just encountered a problem with the ggcoxzph fuction while plotting the Schoenfeld residuals. The confidence bands seemed to be oddly wide. I compared the results to the plot from the function plot.cox.zph where they were much smaller.
Plot with ggcoxzph:
![Rplot](https://user-images.githubusercontent.com/60315910/73135336-2e2d6400-4041-11ea-9771-b981ef9fabde.png)
Plot with plot.cox.zph:
![Rplot01](https://user-images.githubusercontent.com/60315910/73135337-2e2d6400-4041-11ea-9580-930c53be7c33.png)
I looked at the source code of both functions and noticed a difference:
So it seems that the multiplication with d has been dropped in plot.cox.zph. The parameter d is defined earlier in both functions as:
Should ggcoxzph be adjusted to match the results of plot.cox.zph? I prefer the smaller confidence bands of plot.cox.zph because it's earsier to see if the PH assumption is fulfilled from a visual point of view.
The text was updated successfully, but these errors were encountered: