Skip to content

Fix docs describing the ls estimation method - #67

Closed
jasmineirx wants to merge 1 commit into
masterfrom
fix-ls-method-docs
Closed

jasmineirx wants to merge 1 commit into
masterfrom
fix-ls-method-docs

Conversation

@jasmineirx

Copy link
Copy Markdown
Contributor

Summary

  • README.md and CLAUDE.md described ls as "a special case of MAP Bayesian with (almost) fully flat prior." That's not what the code does: when type = "ls", get_map_estimates() 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 what the caller passes in (R/get_map_estimates.R).
  • The "flat prior" description in the README actually matches type = "pls" (see parse_weight_prior.R, which hardcodes weight_prior_var <- 0.001 for that type), which the docs had mislabeled as map_flat_prior — not a real argument value anywhere in the code.
  • Also corrected CLAUDE.md's claim that these are selected via a method argument — method is actually the separate optim() algorithm argument (e.g. BFGS); the estimation type is selected via type.

Test plan

  • Documentation-only change; no code behavior affected.
  • Reviewed R/get_map_estimates.R, R/calc_ofv_ls.R, R/calc_ofv_map.R, R/parse_weight_prior.R, and R/check_inputs.R to confirm the corrected wording matches actual behavior.

🤖 Generated with Claude Code

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>
@jasmineirx jasmineirx closed this Nov 19, 2026
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