【发布时间】:2017-06-26 15:04:39
【问题描述】:
library(nls2)
# Investigate singular gradient.
# Note that this cannot be done with nls since the singular gradient at
# the initial conditions would stop it with an error.
DF1 <- data.frame(y=1:9, one=rep(1,9))
xx <- nls2(y~(a+2*b)*one, DF1, start = c(a=1, b=1), algorithm = "brute-force")
svd(xx$m$Rmat())[-2]
我正在使用nls2 包,它确定非线性回归的非线性最小二乘估计。在文档中,其中一个示例(如上所示)指出它正在研究奇异梯度。我看到 xx 是一个没有参数估计的 nls 对象。这是否意味着算法没有收敛?为什么是这样? svd(xx$m$Rmat())[-2]到底在做什么?
【问题讨论】:
标签: r non-linear-regression singular