Computing derivative using finite differnce method
- From: "Abhijit Bhattacharya" <abhijit@xxxxxxxxxx>
- Date: Wed, 13 Jun 2007 10:37:35 -0400
I am working with MLECOV function.
Inorder to compute the asympotic covariance of the MLE of Weibull
distribution, I took the data set:
x=[1.8487;0.3761;0.75;3.053;1.3545;1.8802;1.57;1.7708;1.3592;3.0466;1.
7961;1.5319;0.5903;0.6288;0.6461;1.6560;1.7172;1.931;1.0509;1.6173;1.3
162;0.7705;1.8889;1.8889;4.1505];
The data is from a solved example of "Life testing and reliablity
estimation", S K Sinha & B. K .Kale.
The MLE for the parameters are
a=2.035, b=3.381
and the loglikehood function for the Weibull distribution fuction:
nloglf=25*(log(a)-log(b))+(a-1)*8.37031865 ...
-(x(1)^a+x(2)^a+x(3)^a+x(4)^a...
+x(5)^a+x(6)^a+x(7)^a+x(8)^a...
+x(9)^a+x(10)^a+x(11)^a+x(12)^a...
+x(13)^a+x(14)^a+x(15)^a...
+x(16)^a+x(17)^a+x(18)^a...
+x(19)^a+x(20)^a+x(21)^a...
+x(22)^a+x(23)^a+x(24)^a...
+x(25)^a)/b;
When I run function
acov=mlecov(params,x,'nloglf',@nloglf)
then we get
acov = NaN NaN
NaN NaN
with the warning
Warning: Cannot compute a cov matrix -- the computed Hessian is not
positive definite.
The closed form solution of the Hessian matrix given in the book is:
Hessain matrix = 28.02844 -6.108481
-6.108481 2.187003
This is however a postive definite matrix.
.
- Follow-Ups:
- Re: Computing derivative using finite differnce method
- From: John D'Errico
- Re: Computing derivative using finite differnce method
- Prev by Date: Re: Grid construction for surface fit
- Next by Date: Re: Incorrect parameter values when building a model in Real-Time Workshop
- Previous by thread: DIS / SWMP protocol for Simulink
- Next by thread: Re: Computing derivative using finite differnce method
- Index(es):
Relevant Pages
|