Error in x$table["GLOBAL", 3] : subscript out of bounds
session_info()
# please paste here the result of
Session info -----------------------------------------------------------------------------------------------------
setting value
version R version 3.3.2 (2016-10-31)
system x86_64, mingw32
ui RStudio (1.0.44)
language (EN)
collate English_United States.1252
tz America/New_York
date 2017-01-06
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()