Computational_Statistics icon indicating copy to clipboard operation
Computational_Statistics copied to clipboard

Better sampling method?

Open isaquepim opened this issue 3 years ago • 2 comments

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.

isaquepim avatar Dec 05 '22 15:12 isaquepim

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

maxbiostat avatar Dec 07 '22 20:12 maxbiostat

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

isaquepim avatar Dec 13 '22 16:12 isaquepim