Bookmark and Share



st: Reversed coefficient sign for exponential MLE vs. ereg

From   Gordon Burtch <>
Subject   st: Reversed coefficient sign for exponential MLE vs. ereg
Date   Fri, 27 Jan 2012 18:13:40 -0500


I am trying to implement the ereg (exponential regression) estimator using ML, and am encountering something odd. I have written a .do file as follows...

program define myexponential
	version 10.0
	args lnf x
	local lambda = exp(`x')
	quietly replace `lnf' = ln(`lambda') - `lambda'*$ML_y1

Maximizing a constant only model with this likelihood function produces a coefficient estimate that matches with that obtained using the ereg command. However, the sign on the coefficient is reversed for some reason. I noticed as well that the log-likelihood is much different (-765.96 versus -1607.53). Does anyone have an idea as to what might be causing this? If I invert `x' when defining lambda (i.e., lambda = exp(-`x')), then the correct coefficient is obtained (though the difference in LL between ereg and my implementation is still quite different).

Any help is appreciated! Regards,

Gord Burtch

*   For searches and help try:
