Create a "safe" nlminb() wrapper, to handel hard errors - #92
Conversation
There was a problem hiding this comment.
💡 Codex Review
Line 124 in 29945c7
When nlminb() throws on both attempts, such as after repeated non-finite objective or gradient evaluations, this fallback sets par to the supplied start. The second attempt in both plsPolychor() and plsPolyserial() always starts at zero, and each function returns optim$par despite convergence = -1, so a failed correlation is inserted into the result as an apparently valid zero. Previously the error propagated to plsCor()'s trycor handler and produced NaN; preserve that missing-result behavior rather than treating the retry start as an estimate.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2bf3c702ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 30c1f84023
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
No description provided.