I am trying to fit a gamma distribution to a specific dataset:
fit_gamma<- flexsurvreg(Surv(time,event) ~ 1, data=mydataset, dist='gamma')
All other distributions work (gengamma, llogis, lnorm,...), only gamma produces below warning messages:
1: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
2: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
Sarah1 on May 27th asked a similar question (topic: "flexsurv " does not work
but I do not see the answer to fix the NaNs.
Could anybody please help?
Thank you very much!