home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l455 / 3.ddi / MMLE3.DI$ / ML_TUT1.M < prev    next >
Encoding:
Text File  |  1993-03-11  |  1.2 KB  |  29 lines

  1. disp('---------------------------------------------------------- ml_tut1.m')
  2. disp('Theory says the llf should increase by 0.5 when final')
  3. disp('parameters are perturbed by their insensitivities if')
  4. disp('the minimum is quadratic. Lets check - be patient.');
  5. disp(' ')
  6.  
  7. llffinal=llf;deltallf=0*pidf;insens=exp(-log(diag(hes))/2);
  8.     for ii=1:prod(size(pid));
  9.     p=pfin;p(pid(ii))=p(pid(ii))+insens(ii);
  10.     eval(dolike);deltallf(ii)=nllf-llffinal;
  11.     end
  12. disp('Delta_llf''s are');deltallf'
  13. disp(' ')
  14. disp('Now lets find the displacements from pfin that put us at')
  15. disp('the points on the confidence ellipsoid corresponding to ')
  16. disp('the Cramer-Rao bounds. eval(dopcr) puts the pts in cols of pcr')
  17. eval(dopcr)
  18. disp(' ')
  19. disp('The diagonal gives the Cramer-Rao bounds');disp(' ');
  20. disp('The columns in diag(insens) also reach the ellipsoid')
  21. diaginsens=diag(insens)
  22. disp(' ')
  23. disp('Now prove the col vectors in pcr lie on the ellipsoid')
  24. disp('If this is so, pcr(:,i)''*hes*pcr(:,i) should equal one')
  25. disp('i.e., diag(pcr''*hes*pcr) should = eye')
  26. pcr'*hes*pcr
  27. disp('It is.')
  28. disp('------------------------------------------------------ end ml_tut1.m')
  29.