Solved – Fitting exponential (regression) model by MLE

exponential distributiongeneralized linear modelmaximum likelihoodr

Let's say I have an outcome that is exponentially distributed, so $p(y|\lambda_i) = \lambda_i e^{-\lambda_i y}$. However, we also know that $\log{\lambda_i} = \beta_0+\beta_1x_i$. If we want to estimate the MLE's for $\beta_0$ and $\beta_1$, what's the best way to do it given data?

I was thinking of using the following code:

summary(glm(y~x,family=Gamma(link="log")))

Not 100% sure what the various arguments are going though.

Best Answer

This has been answered on the R help list by Adelchi Azzalini: the important point is that the dispersion parameter (which is what distinguishes an exponential distribution from the more general Gamma distribution) does not affect the parameter estimates in a generalized linear model, only the standard errors of the parameters/confidence intervals/p-values etc.; in R an estimate of the dispersion parameter is automatically reported, but as Azzalini comments, summary.glm allows the user to specify the dispersion parameter. So, as stated by Azzalini,

The Gamma family is parametrised in glm() by two parameters: mean and dispersion; the "dispersion" regulates the shape.

So [one] must fit a GLM with the Gamma family, and then produce a "summary" with dispersion parameter set equal to 1, since this value corresponds to the exponential distribution in the Gamma family.

In practice:

fit <- glm(formula =...,  family = Gamma(link="log"))
summary(fit,dispersion=1)   

[Azzalini had family=Gamma, i.e. using the default inverse link; I changed it to specify the log link as in your question.]

Related Question