llrs / llrs/experDesign

Select samples for experiment

Open
#39 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
10
Forks
1
PR merge metrics
No merged PRs in 30d

Description

It wold be nice to have something to select the samples from a cohort so that they are leveled and without unwanted stratification (aka, all the boys in one class and all the girls in another class, or all the women of certain age vaccinated and all the men of the same age not vaccinated):

Something like:

```r
i <- select_samples(info, var = c("age", "sex", "classroom"), n = 40)
i
## [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
```

Where i are the rows of the samples to use.
It would need to check that age and sex are balanced, not sure if this is related to `extreme_cases` but not totally as it should check that within those variables they are not extreme, or show if there is a stratification or not.

This might be related to design the experiment not to batches, but could be also relevant for follow up studies or reusing samples from previous studies (this came up in the EPIVIRCO study)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing `extreme_cases` functionality and the proposed `select_samples(info, var, n)` interface. Define how balance across variables such as age, sex, and classroom should be assessed, including how stratification is reported. Done means the selection behavior and balance criteria are specified clearly enough to implement and verify.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.