[英]How do I calculate in Matlab the 95% confidence interval with lsqcurvefit?
由於Matlab中固定參數的一些問題,我不得不從標准轉換。 fit
lsqcurvefit
命令。
對於正常的fit
命令,輸出參數之一是gof
,從中我可以計算出每個參數的+/-和r ^ 2值。
對於lsqcurvefit
也應該是可能的。 但是我沒有把它作為輸出參數之一。
或者換句話說:我如何從lsqcurvefit
計算出fitparamter的+/-? 有人可以幫我嗎?
謝謝,尼可
是的。 獲取lsqcurvefit
所有輸出參數,並像下面這樣在nlparci
使用它們:
[x,resnorm,residual,exitflag,output,lambda,jacobian] =...
lsqcurvefit(@myfun,x0,xdata,ydata);
conf = nlparci(x,residual,'jacobian',jacobian)
現在conf
為您的N
擬合參數包含一個N x 2
矩陣。 conf
每一行給出相應參數的上下95%置信區間。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.