Skip to content

Allocation review suggestions - #12

Open
szimmer wants to merge 3 commits into
allocate_updates_20Jul2026from
alloc-review-sz
Open

Allocation review suggestions#12
szimmer wants to merge 3 commits into
allocate_updates_20Jul2026from
alloc-review-sz

Conversation

@szimmer

@szimmer szimmer commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator
  • Update .adjust_fixed_total to set aside stratum that need to be fixed (to lbound or N.h) and THEN do allocation. Prior method could end up with a rounded allocation of 3 when the raw allocation was less than 1, makes more sense for it just to be 2.
  • Update .round_fixed_total to a much simpler method based on: https://stackoverflow.com/questions/32544646/round-vector-of-numerics-to-integer-while-preserving-their-sum and remove now unnecessary .score_* functions
  • Change some things from warnings to errors - when h*lbound > n.samp or sum(N.h) < n.samp

@szimmer szimmer changed the title revise .adjust_fixed_total to set aside issues and do allocation amon… Allocation review suggestions Jul 31, 2026
@szimmer
szimmer marked this pull request as ready for review July 31, 2026 16:32
@szimmer
szimmer requested a review from jdbunker July 31, 2026 16:32
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