formulaic_contrasts.datasets.treatment_response

formulaic_contrasts.datasets.treatment_response#

formulaic_contrasts.datasets.treatment_response(size=80, *, seed=0)#

Example dataset mimicking a 2-arm randomized controlled trial with responders and non-responders

Contains the following variables:

  • treatment: 1:1 drugA vs. drugB

  • response: drugA: 1:3 responder vs. non_responder, drugB: 3:1 resonder vs. non_responder

  • biomarker: a continuous variable with values drawn from the following normal distributions:

Parameters:
  • size (int (default: 80)) – dataset size, must be a multiple of 8

  • seed (int (default: 0)) – random seed

Return type:

DataFrame