nlinfit
非线性回归
语法
说明
示例
输入参数
名称-值参数
输出参量
详细信息
提示
要基于预测生成误差估计,请使用可选输出参量
R、J、CovB或MSE作为nlpredci的输入。要基于估计系数
beta生成误差估计,请使用可选输出参量R、J、CovB或MSE作为nlparci的输入。如果您使用稳健拟合选项
RobustWgtFun,则必须使用CovB(可能还需要MSE)作为nlpredci或nlparci的输入,以确保在计算置信区间时考虑稳健拟合。
算法
nlinfit将Y或modelfun(beta0,X)中的NaN值视为缺失数据,并忽略对应的观测值。对于非稳健估计,
nlinfit使用莱文贝格-马夸特非线性最小二乘算法 [1]。对于稳健估计,
nlinfit使用Iteratively Reweighted Least Squares的算法([2]、[3])。在每次迭代中,基于前一次迭代中每个观测值的残差重新计算稳健权重。这些权重会对离群值进行降权,从而降低它们对拟合的影响。迭代一直持续到权重收敛为止。为观测值权重指定函数句柄时,权重取决于拟合模型。在这种情况下,
nlinfit使用迭代广义最小二乘算法来拟合非线性回归模型。
参考
[1] Seber, G. A. F., and C. J. Wild. Nonlinear Regression. Hoboken, NJ: Wiley-Interscience, 2003.
[2] DuMouchel, W. H., and F. L. O'Brien. “Integrating a Robust Option into a Multiple Regression Computing Environment.” Computer Science and Statistics: Proceedings of the 21st Symposium on the Interface. Alexandria, VA: American Statistical Association, 1989.
[3] Holland, P. W., and R. E. Welsch. “Robust Regression Using Iteratively Reweighted Least-Squares.” Communications in Statistics: Theory and Methods, A6, 1977, pp. 813–827.