Skip to content
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

Better sampling method? #8

Open
isaquepim opened this issue Dec 5, 2022 · 2 comments
Open

Better sampling method? #8

isaquepim opened this issue Dec 5, 2022 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@isaquepim
Copy link

Assingning articles/topics to students leaves the door to articles not being selected. Probably assigning students to articles/topics is a better way to uniformly distribute themes. Maybe creating a "most uniform" list of articles/topics and assigning students to an index of the list solves the problem.

@maxbiostat
Copy link
Owner

If you can make a proposal, I'll take a look

@isaquepim
Copy link
Author

Students <- c("Aldo", "Caio", "Danilo", "Eduardo",
              "FelipeA", "FelipeC", "Fredson", "Gabriela",
              "Isaque", "Tomás", "Wellington")

Methods <- c("RS", "IS", "GS", "MH")

set.seed(777)
each.method <- sample((c(1:length(Students)) %% length(Methods)) + 1)

res <- tibble::tibble(
  student = Students,
  method = Methods[each.method]
)

Here's my proposal:

  • Change unholy seed.
  • Create a sequential list of indexes, e.g, if there are four topics and eleven students the list is (1,2,3,4,1,2,3,4,1,2,3).
  • Shuffle list and assign topics.

Every topic is guaranteed* to show up and topics are quite evenly distributed. The code remains basically the same.

* If, of course, there are more students than topics

@maxbiostat maxbiostat self-assigned this Dec 14, 2022
@maxbiostat maxbiostat added the bug Something isn't working label Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants