Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upgggcoxzph doesn't produce a plot when only 1 predictor variable #103
Comments
|
Thank you for reporting this issue. Bug fixed now! |
|
+! Thanks kassambara |
Expected behavior
I am expecting that a plot will be produced for the single predictor variable in the model.
Actual behavior
Error in x$table["GLOBAL", 3] : subscript out of bounds
Steps to reproduce the problem
This is the example with the package - works fine (also works for 2 predictors)
fit <- coxph(Surv(futime, fustat) ~ age + ecog.ps + rx, data=ovarian)
cox.zph.fit <- cox.zph(fit)
ggcoxzph(cox.zph.fit)
This is the example but with only a single predictor - age
fit <- coxph(Surv(futime, fustat) ~ age, data=ovarian)
cox.zph.fit <- cox.zph(fit)
ggcoxzph(cox.zph.fit)
Error message is returned
Error in x$table["GLOBAL", 3] : subscript out of bounds
session_info()