Problem about likelihood ratio hypothesis test



I obtained estimates by fitting a observed dataset to the
gamma distribution and exponential distribution,
respectively, by the maximum likelihood method using the
MATLAB software package. Likelihood ratio hypothesis test
were performed for the comparison of the fit to the gamma
distribution with the fit to the exponential distribution.
P is the probability that the difference in sum-of-squares
for the gamma model and the exponential distribution is as
large as observed or larger if the exponential
distribution is correct.
I want to know whether the test I choosed is correct or
not.
If right, I am not sure whether the following programs
performed for the likelihood ratio test are correct or
not.

[a,b]=gamfit(data1);
[pa,parmci] = expfit(data1);
% returns maximum likelihood estimates (MLEs) for the
parameters of gamma distribution and exponential
distribution.

[logL,info]=gamlike([a(1),a(2)], data1);
[nlogL, avar] = explike(pa, data1);
% returns the negative of the log-likelihood for the gamma
and exponential distribution.
logL1=- logL; logL2=- nlogL;

[H, p, Ratio, CriticalValue] = lratiotest(logL1,
logL2,1,0.95);
% Likelihood ratio hypothesis test

.



Relevant Pages

  • Re: Predicting using SAS-Survival analysis
    ... The problem with simply using the highest likelihood is that those ... one parameter, Weibull, logistic, log-normal, normal, and log-logistic ... are two-parameter distributions, and gamma has three. ... chi-square distribution with 1 degree of freedom, ...
    (sci.stat.math)
  • Re: Predicting using SAS-Survival analysis
    ... The problem with simply using the highest likelihood is that those ... one parameter, Weibull, logistic, log-normal, normal, and log-logistic ... are two-parameter distributions, and gamma has three. ... chi-square distribution with 1 degree of freedom, ...
    (sci.stat.edu)
  • Re: Simulating Poisson process/Random numbers
    ... >I have a model which uses the exponential distribution to estimate ... >inter-arrival times of events from various sources. ... >combination of sources can be modelled as a poisson process. ...
    (sci.math.research)
  • Re: Maybe Exponential? check it out
    ... the time to make a pizza is exponentially distributed with average ... An exponential distribution requires only one parameter. ... Each customer orders a full pizza? ...
    (sci.math)
  • Re: Bimodal Gamma Distribution
    ... Is it true that Gamma distributions "cannot" model ... It has two peaks in the density. ... The red line is normal curve and green line is gamma curve. ... The red line in yourfigure is NOT a Normal distribution. ...
    (sci.stat.math)