R Project Sprint 2023 - Enhancing sample.int for unequal probability sampling #26
Replies: 5 comments 5 replies
-
In some very limited experiments, I think the documentation should indicate that Poisson sampling (ie, random sample size but correct probabilities) and unequal probability sampling with replacement are fast and will be suitable for some applications where without-replacement sampling is slow. It might even be worth having something like Finally (for now): unequal probability without replacement differs from all the other methods in that the probabilities must sum to the desired sample size. What should we do if they don't sum to (nearly) an integer? Should there be some sort of rescaling option to allow the user to specify a sample size that isn't the sum of the probabilities (probably not)? |
Beta Was this translation helpful? Give feedback.
-
My take on this was that this is their (sampling package) convention. |
Beta Was this translation helpful? Give feedback.
-
No, I think If |
Beta Was this translation helpful? Give feedback.
-
I was exploring existing algorithms with good enough properties, and I think the Brewer procedure is a good candidate. Here's a C translation of https://gist.github.com/dickoa/eed351acfcdf7383ee900491efcd1ff6 It's 8~9 times faster than |
Beta Was this translation helpful? Give feedback.
-
As an additional note: the
|
Beta Was this translation helpful? Give feedback.
-
R Project Sprint 2023 - Enhancing sample.int for unequal probability sampling
https://contributor.r-project.org/r-project-sprint-2023/projects/enhance-sample/
Beta Was this translation helpful? Give feedback.
All reactions