I want to use a mixture of Gamma distribution as a parametric model for survival analysis on censored data using R. In the "flexsurv" package there are different distributions but I couldn't find a Gamma mixture distribution. In that package, it states that:
"Any user-defined parametric distribution can be fitted, given at least an R function defining the probability density or hazard."
https://cran.r-project.org/web/packages/flexsurv/flexsurv.pdf
Is there a way to directly define a Gamma mixture distribution (with a pre-specified number of components) in a parametric way to directly use this package for the maximum likelihood estimation?
data <- Surv(ages, censored)
fit_gammamixture <- flexsurvreg(data~1, dist=???)
I've found this paper regarding survival analysis with a mixture of gamma distributions but it is hard to understand and implement the algorithm presented here.
Modeling Censored Lifetime Data Using a Mixture of Gammas Baseline https://projecteuclid.org/download/pdf_1/euclid.ba/1340371053