flexsurvreg with gamma distribution produced NaN warnings. Other distributions work. How can I fix that?

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:

Warning messages:
1: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
NaNs produced
2: In (function (q, shape, rate = 1, scale = 1/rate, lower.tail = TRUE, :
NaNs produced

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!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.