[R] Survreg with gamma distribution

Kuan-Ta Chen kuan at ilife.cx
Sun Oct 17 16:50:53 CEST 2004

Hi, all:

I find survreg {survival} has provided many distributions such as weibull,
lognormal, etc. But I wonder why it doesn't have the support for gamma
distribution since it should be a good distr. in lifetime analysis. Can
anybody figure out the reason?

I've tried to implement the likelihood function of progressively censored
data for gamma distr. and use optim() to solve the paramemters. The
log-likelihood function L contains some integrations. I use tryCatch() to
capture the error when integration lead to divergence and return Inf.
But if consequent two calls to the objective function return Inf, optim()
will raise errors:

Error in optim(c(ga, 1/la), fr, method = "BFGS") :
        non-finite finite-difference value [1]

What can I do except for choosing better initial values?

The last question, by its name "survreg", survreg does its job by
but why p.75 in Tableman, Kim (2004) said that "We use the S function
survReg to fit parametric models (with the MLE approach)...". Does survreg
use regression or MLE approach?

Thanks for your help.

[1] Mara Tableman, Jong Sung Kim, Survival Analysis Using S, Chapman &
Hall/CRC, 2004

More information about the R-help mailing list