This enhancement has been incorporated in Release 2006a (R2006a). For previous product releases, read below for any possible workarounds:
There is a well-defined relation between the width of the confidence interval in standard errors and the percentage of observations falling within the confidence interval. To calculate the standard error, first you will need to find the confidence interval. Then you can use the TINV function to calculate the number of standard errors spanned by the confidence interval. Finally, divide the confidence interval by the number of standard errors spanned by the confidence interval to find the standard error.
Here is an illustration of how to compute the standard error:
1. Fit a model using the NLINFIT function, and get the parameters.
load hald
y = heat;
x = ingredients(:,4);
[b,r,J] = nlinfit(y,x,@(b,x) b(1)+b(2)*x, 1:2);
2. Estimate the confidence interval using the NLPARCI function:
alpha = 0.05
ci = nlparci(b,r,J,alpha);
3. Compute the standard error from the confidence interval using the TINV function:
t = tinv(1-alpha/2,length(y)-length(b));
nlinfit_se = (ci(:,2)-ci(:,1)) ./ (2*t)
Best Answer