pkgdown/extra.css

Skip to contents

make_groups() creates class-balanced case-control groups for classification models. It separates the data into control and case groups. It then calculates the amount of data from each case in the control group and randomly selects the number of each control class samples. It also filters the control data of sex specific cases.

Usage

make_groups(
  join_data,
  variable = "Disease",
  case,
  cases,
  only_female = NULL,
  only_male = NULL,
  seed = 123
)

Arguments

join_data

Olink data in wide format joined with metadata.

variable

The variable to predict. Default is "Disease".

case

Case to predict.

cases

Cases.

only_female

Cases that are female specific.

only_male

Cases that are male specific.

seed

Seed for reproducibility. Default is 123.

Value

A list with combined, class-balanced control-case groups for each case.