fit GLM for weibull family I am trying to fit generalized linear model for weibull family, but when I try it in R, it gives an error. I know that weibull does not fit in exponential family, but I have read some research articles about fitting GLM for weibull family. If anyone can help me with this, I really appreciate. 
It gives the following error. 
> data(lung)
> glm(time ~ age+sex+ph.ecog+ wt.loss, family = weibull(link='log'), data = lung)
Error in glm(time ~ age + sex + ph.ecog + wt.loss, family = weibull(link = "log"),  : 
  could not find function "weibull"

 A: Sorry i'm quite late with this.... but might help someone i believe :
gamlss package is what you should be looking for. It supports almost all the distributions( not just exponential family ones). It gives amazing flexibility on almost all the parameters of a distribution.
A: The glm() function does not support the Weibull distribution in R unfortunately. You can try ?family to see which distributions are available. I would try using survreg() from the survival package instead.
A: I have used the brms package, which is Bayesian. It supports the Weibull, exponential, lognormal, Frechet, and other families and (left/right/interval) censoring so implements AFT models. It also includes random effects which are known in survival models as "frailty", and a host of other regression options like gam-style smoothers.
Since Bayesian approaches use MCMC sampling, it's slower than glm, gamlss, or survreg, but it's also a comprehensive regression solution, and being Bayesian has other advantages. (I love it's stanplot, which provides a host of illuminating diagnostic plots.)
