Problem about likelihood ratio hypothesis test
- From: "lian " <lpksohu19842002@xxxxxxxxxxxx>
- Date: Fri, 17 Aug 2007 05:38:53 +0000 (UTC)
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
.
- Follow-Ups:
- Re: Problem about likelihood ratio hypothesis test
- From: Peter Perkins
- Re: Problem about likelihood ratio hypothesis test
- Prev by Date: Re: Sorting the colors in an image (3D matrix)
- Next by Date: Re: galois field to double?
- Previous by thread: help find which elements contributed to hist3 bins
- Next by thread: Re: Problem about likelihood ratio hypothesis test
- Index(es):
Relevant Pages
|