standard deviation of parameters in lsqcurvefit?
35 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
1-Is there a way to get the standard deviation or any measure of error for the optimized parameters when using lsqcurvefit?
2-can someone tell me how to get the error surface( it could one multi-dimensional depending on the number of parameters you're optimizing) in lsqcurvefit? saying it differently the amount of error in each step it is going through along with the value of parameters at that step.
I've attached a simple example of lsqcurvefit. can you show me the standard deviation on that if possible.
Thanks
0 Commenti
Risposta accettata
Star Strider
il 19 Set 2014
3 Commenti
Star Strider
il 24 Set 2014
The nlparci function will provide those for you, although instead of presenting them as, for instance, 5±0.2, it will present them as [4.8 5.2]. But it will give you the information you want about them.
For lsqcurvefit, you have to request all the outputs, in this syntax:
[beta,resnorm,resid,exitflag,output,lambda,J] = lsqcurvefit(...)
and then to get the confidence intervals from nlinfit, use this syntax for it:
ci = nlparci(beta,resid,'jacobian',J)
The output ‘ci’ are the confidence intervals for each parameter in the sequence you have presented them to nlparci in the ‘beta’ vector.
Benjamin
il 25 Mar 2021
Correct. So in other words,
Standard deviation = SD = (ci(2) - beta)/2
Because nlparci gives the 95% confidence interval which is (+/-)2*SD.
Più risposte (1)
Matt J
il 19 Set 2014
Modificato: Matt J
il 19 Set 2014
1. You could compute parameter covariance estimates from the output Jacobian and residuals,
[x,resnorm,residual,exitflag,output,lambda,J]= lsqcurvefit(...)
xCovariance = inv(J.'*J)*var(residual)
2. Wasn't entirely clear to me what you're asking for, but it sounds like you want to use the PlotFcns input option with @optimplotresnorm.
0 Commenti
Vedere anche
Categorie
Scopri di più su Interpolation in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!