-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rep_col_shuffle()? #484
Comments
I dig it! If folks would find this pedagogically useful, I think this is surely within scope and would have a low maintenance burden. :) |
I think I can see the value, but I'm having a rough time picturing what procedures would look like based on @andrewpbray's description. @andrewpbray -- Could you write up a couple of examples as though
|
Here's an example of a permutation test using a difference in means, starting with the existing implementation from full pipeline examples docs.
where the output of the second pipeline would be a data frame with The syntax would be the same for a permutation test for a difference in proportions, the coefficient of a linear model, etc. If we did a close port of |
This semester I've been seeing how far I can get in terms of simulation-based inference without using the main part of the infer package.
rep_slice_sample()
is all you need to do bootstrapping (and it's also very handy for simulation). I'm curious what y'all think about an analogous function likerep_col_shuffle()
(orrep_shuffle_col()
)?The motivation here is that the default API for infer is based around the formalism of a NHST. These two functions -
rep_slice_sample()
andrep_shuffle_col()
- would allow users (and teachers) to get to through the generate step without the formalism. This helpful for creating a more porous boundary with other forms of simulation; there would be just two fairly generic mechanistically named functions instead of five functions laser focused on the NHST framework.In terms of implementation, it looks like
generate()
takes two paths:rep_slice_sample()
for bootstrapping andpermute()
>permute_once()
>permute_col()
>sample()
for permutations. Seems like the easiest approach would be to just wrappermute()
.Thoughts?
The text was updated successfully, but these errors were encountered: