What is the algorithm used in NLPARCI in the Statistics Toolbox?
13 次查看(过去 30 天)
显示 更早的评论
Specifically, what method is used to calculate the 95% confidence limits?
采纳的回答
MathWorks Support Team
2009-6-27
The method used to compute the confidence intervals is based on an "asymptotic normal distribution for the parameter estimate". They are not based on "likelihood ratios." For a linear regression of Y on X, confidence bounds on the parameters can be calculated by a method that is roughly equivalent to this:
b = x\y;
% coefficient estimates
r = y-x*b;
% residuals
df = (length(y)-length(b));
% residual degrees of freedom
s2 = (norm(r))^2 / df;
% estimated residual variance
v = s2 * inv(x'*x);
% estimated coefficient variance
b + tinv(.975,df) * sqrt(diag(v))
% upper confidence bounds
b - tinv(.975,df) * sqrt(diag(v))
% lower confidence bounds
For nonlinear regression, bounds are computed the same way except:
1. b is computed using NLINFIT.
2. r is computed by evaluating the nonlinear function.
3. The n-by-p Jacobian matrix is used in place of x in the expression for v. The value in row i, column j is the derivative of the nonlinear function with respect to the j th coefficient, evaluated at the i th data point.
In either the linear or nonlinear case, MATLAB uses a calculation formula that is equivalent to this one but numerically more stable.
Please also see the following reference for nonlinear data fitting:
Bates, Douglas, M. and Watts, Donald G., "Nonlinear Regression Analysis and Its Applications." John Wiley & Sons, NY. (1988).
Pages 52-60 discuss and show formulae for approximate confidence intervals on the parameters and expected response.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear and Nonlinear Regression 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!