Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: about MLE of exponential distribution

From   Maarten Buis <>
Subject   st: Re: about MLE of exponential distribution
Date   Wed, 7 Mar 2012 17:45:15 +0100

On Wed, Mar 7, 2012 at 4:40 PM, mahadeb poudel wrote me privately:
> I am using a six probability distribution function namely Normal, Beta,
> Gamma, Weibull, Lognormal, and Exponetial for the yield risk analysis of
> rice in my PhD dissertation research. I want to estimate the parameters of
> each distribution by using Maximum likelihood method. For this, I am using
> log likelihood estimation method. So, far I can estimate the parameters
> of Normal, Gamma, Weibull, and Lognormal, however I can not estimate the
> parameters of Beta and Exponential distribution. The exponential
> distribution I have applied is
> program define expon
>   1.version 11.0
>   2. args lnf lamda
>   3. quietly replace `lnf'= ln(`lamda ')-(`lamda')*($ML_Y1)
>   4. end
> ml model lf expon (theta:nepn=time timesq)
> ml search
> ml maximize
> I always get: invalid syntax r(198)
> I am suffering by this problem. Therefore, Could you please help me to solve
> the problem?

Questions like these should not be sent privately, but instead to the
statalist. Reasons for that are discussed here:

I would not try to program that yourself, as it has already been done.
For the normal/Gaussian distribution you can just use -regress- or
-glm-, for the beta, gamma, Weibull, and lognormal you can download
the -betafit-, -gammafit- -weibullfit-, -lognfit- packages from SSC,
see: -help ssc-.

With the appropriate constraints you can use -gammafit- to estimate an
exponential distribution. In that case you don't want to use the
-alphavar()- option and constrain the constant of the alpha equation
to 1, and typically you parametrize an exponential distribution in
terms of a rate, which you can get by specifying the -alt- option:

constraint 1 [alpha]_b[_cons] = 1
gammafit varname, alt constr(1)

-- Maarten

Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen

*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index