I can not plot logistic or gaussian distributions fit to my data.
I load my data and create a survreg object
gbcs <- read.csv("https://ryanwomack.com/data/gbcs.csv")
recsurv <- Surv(rectime,censrec, gbcs)
If I try to fit a exponential distribution, It does not plot
fit_exp <- survreg(recsurv~1, dist="exponential")
plot(fit_exp)
Error in xy.coords(x, y, xlabel, ylabel, log) :
'x' is a list, but does not have components 'x' and 'y'
Instead, when I use the package flexsurv, it plots easily
library(flexsurv)
fit_exp <- flexsurvreg(recsurv~1, dist="exp")
plot(fit_exp)
My point is: The flexsurv pack does not have some important distributions. How can I plot standard distributions fit with survreg() ?