How to compute the standard error for coefficients returned from fit function?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I fit my data to an exponential model using the FIT function:
% X data
for i=1:32
TE(i)=i*12.4e-3;
end
X=TE(2:end);
% Y data
MeanA=[1.2022e+03, 1.1752e+03, 969.7900, 851.6100, 708.6800, 621.5000, 515.5300, 454.1000, 362.2100, 334.1400, 269.0400, 236.8100, 216.3000, 201.4900, 163.6800, 154.6000, 156.5600, 140.9800, 143.9400, 157.7100, 115.1300, 114.9200, 115.6300, 111.0800, 104.1600, 105.5900, 110.0500, 112.1600, 127.5700, 107.1800, 111.8200, 95.7400];
Y=MeanA(2:end);
fo = fitoptions('Method','NonlinearLeastSquares',...
'Lower',[500,0,-100],...
'Upper',[9000,30,400],...
'StartPoint',[1528,15, 90]);
ft = fittype('A*exp(-R2*x)+B','options',fo,'coefficients',{'A','R2','B'});
f2= fit(X',Y',ft)
The result I get from the fit is:
f1 =
General model:
f2(x) = A*exp(-R2*x)+B
Coefficients (with 95% confidence bounds):
A = 1597 (1551, 1643)
R2 = 15.64 (15.01, 16.27)
B = 97.78 (89.36, 106.2)
But I don't know how to calculate the standard error of the coefficients (A, B and R2) from the confidence intervals? I know that I can find the standard error of the coefficients using other fit functions such as fitnlm but I need to find the standard error of the coefficients using the "fit" function because I need to apply Lower and Upper bounds.
Thanks very much!
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Linear and Nonlinear Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!