Estimating parameter uncertainties using fminunc and hessian
Show older comments
Dear Sir/Madam,
I have experimental data which is often described in litrature using the Kraus model (shown below). I am trying to identify the parameters (
,
and m) in the Kraus model via optimisation.
I wanted to calculate the errors present in the parameters too. I have used both lsqcurvefit and fminunc for the optimisation process. Both functions give me identical optimised parameters but the standard error returned by both functions vary. For lsqcurvefit I use the output jacobian matrix with the nlparci tool to dermine 95% confidence interval and back track to calculate the standard errors.
[x,resnorm,residual,exitflag,output,lambda,jacobian] = lsqcurvefit(___)
ci = nlparci(x,residual,'Jacobian',J); %Returns 95% confidence interval
err = ((ci(:,2)-ci(:,1))./3.92);
For fminunc, the function I minimise is the sum of square residues by comparing the Kraus model with the experimental data. Fminunc returns the otimised parameters and the hessian matrix. The hessian matrix is what I use to determine the standard errors.
err = sqrt(diag(inv(Hessian)))
The standard errors I obtain for the paramters differ. Why is this so? I would really appreciate any help I get with this. Thank you.
Kind Regards,
Vin
Answers (0)
Categories
Find more on Get Started with Curve Fitting Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!