Reputation: 43
I am using solnp() in R. I know the convergence output of 0 indicates successful convergence. But what is the difference between values of 1 or 2? I can't seem to find the answer in the R documentation. Thank you.
Upvotes: 1
Views: 211
Reputation: 173
Digging in the source code of solnp()
I found the following
if (get(".solnp_errors", envir = .solnpenv) == 1) {
convergence = 2
if (trace)
cat(paste("\nsolnp--> Solution not reliable....Problem Inverting Hessian.\n",
sep = ""))
}
else {
if (.vnorm(c(tt[1], tt[2])) <= tol) {
convergence = 0
if (trace)
cat(paste("\nsolnp--> Completed in ", .solnp_iter,
" iterations\n", sep = ""))
}
else {
convergence = 1
if (trace)
cat(paste("\nsolnp--> Exiting after maximum number of iterations\n",
"Tolerance not achieved\n", sep = ""))
}
}
This means that
Upvotes: 1