我必须将我的标准lm回归重建为nls回归,因为我必须确定其中一个变量的下限:
NONLinear <- nls (PD04_AL ~ a * Health_Care + b * Utilities + c * TALOG + d * CFOP + e * GROSS_MARGIN + f * AbsPAPER1 + g * TOT_DEBT_TO_TOT_CAP + h * RETURN_ON_ASSET + i, data = full,
start = c(a =0, b= 0, c = 0, d = 0,e = 0,f = 0,g = 0, h = 0, i = 0),algorithm = "port", na.action = "na.exclude",lower = c(a = -Inf,b= -Inf, c = -0.20,d= -Inf,e= -Inf,f= -Inf,g= -Inf,h= -Inf,i= -Inf))
我经常使用的函数“cooks.distance(NONLinear)不适用于nls调用。有没有办法快速计算厨师距离以便我的nls回归?
非常感谢您的帮助!
丹尼尔