Skip to content

Create a "safe" nlminb() wrapper, to handel hard errors - #92

Merged
Kss2k merged 5 commits into
mainfrom
safe-nlminb
Jul 28, 2026
Merged

Create a "safe" nlminb() wrapper, to handel hard errors#92
Kss2k merged 5 commits into
mainfrom
safe-nlminb

Conversation

@Kss2k

@Kss2k Kss2k commented Jul 28, 2026

Copy link
Copy Markdown
Owner

No description provided.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

par = start,

P1 Badge Return a missing estimate after optimizer failure

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".

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread R/pls_polycor.R Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread R/pls_polycor.R Outdated
@Kss2k
Kss2k merged commit ac9072e into main Jul 28, 2026
6 checks passed
@Kss2k
Kss2k deleted the safe-nlminb branch July 28, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant