我一直在使用Synth软件包(使用optimx进行优化),我找不到Synth在不收敛时是否会出现非收敛错误的答案。我可以在optimx的帮助文件中看到,默认情况下,它不会保存失败(即那些不收敛的答案)所以我猜测默认情况下它不会将这些失败传递给Synth;但是,我想确保我得到的答案已经收敛。有没有办法通过convcode()设置或其他什么来确定这一点?
答案 0 :(得分:0)
我查看了代码并且它没有为save.failures
设置控件值所以它应该使用optimx
的默认行为,因为你已经知道它是假的。以下是optimx
代码中对synth()
的相关调用。
rgV.optim.1 <- optimx(par = SV1, fn = fn.V, gr = NULL,
hess = NULL, method = optimxmethod, itnmax = NULL,
hessian = FALSE, control = list(kkt = FALSE, starttests = FALSE,
dowarn = FALSE, all.methods = all.methods), X0.scaled = X0.scaled,
X1.scaled = X1.scaled, Z0 = Z0, Z1 = Z1, quadopt = quadopt,
margin.ipop = Margin.ipop, sigf.ipop = Sigf.ipop,
bound.ipop = Bound.ipop)
....
rgV.optim.2 <- optimx(par = SV2, fn = fn.V, gr = NULL,
hess = NULL, method = optimxmethod, itnmax = NULL,
hessian = FALSE, control = list(kkt = FALSE,
starttests = FALSE, dowarn = FALSE, all.methods = all.methods),
X0.scaled = X0.scaled, X1.scaled = X1.scaled,
Z0 = Z0, Z1 = Z1, quadopt = quadopt, margin.ipop = Margin.ipop,
sigf.ipop = Sigf.ipop, bound.ipop = Bound.ipop)