Skip to content

RXR-3368: Minor documentation fixes to better reflect code. - #68

Merged
jasmineirx merged 6 commits into
masterfrom
RXR-3368
Nov 20, 2026
Merged

jasmineirx merged 6 commits into
masterfrom
RXR-3368

Conversation

@jasmineirx

Copy link
Copy Markdown
Contributor

We listed map, map_flat_prior, and ls, however the actual types accepted are map, pls, ls. Additionally, ls was inappropriately described: rather than acting as a special case of flattened priors (which is how "pls" works), ls calls a separate OFV function, which does not depend on error distributions at all and is appropriately a least squares method.

jasmineirx and others added 2 commits November 19, 2026 14:58
README.md and CLAUDE.md described `ls` as "a special case of MAP
Bayesian with (almost) fully flat prior", but get_map_estimates()
actually swaps in calc_ofv_ls(), an objective function with no
prior/omega term at all, and forces error = list(prop = 0, add = 1)
regardless of user input (R/get_map_estimates.R). That description
actually matches `type = "pls"` (parse_weight_prior.R), which the docs
had mislabeled as `map_flat_prior` - not a real argument value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@mccarthy-m-g

Copy link
Copy Markdown
Contributor

While we're here, would it be worth it to update the function argument too?

type = "map",

into:

type = c("map", "pls", "ls")

and then add an arg.match in the function body.

@roninsightrx roninsightrx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ok

@jasmineirx

Copy link
Copy Markdown
Contributor Author

While we're here, would it be worth it to update the function argument too?

type = "map",

into:

type = c("map", "pls", "ls")

and then add an arg.match in the function body.

I made the suggested change, since I think this is safer for consumers of this package. In between my opening this PR and my last commit, the CLAUDE.md file was replaced with the more generic AGENTS.md file. I have merged master into this branch and ensured AGENTS.md correctly describes the different estimation types.

@mccarthy-m-g mccarthy-m-g left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm! Just one little suggestion:

Comment thread R/get_map_estimates.R Resolved
jasmineirx and others added 2 commits November 20, 2026 11:33
Co-authored-by: Michael McCarthy <51542091+mccarthy-m-g@users.noreply.github.com>
@jasmineirx
jasmineirx merged commit 476c6ac into master Nov 20, 2026
1 check passed
@jasmineirx
jasmineirx deleted the RXR-3368 branch November 20, 2026 16:48
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.

3 participants