gabrielodom / pathwayPCA

integrative pathway analysis with modern PCA methodology and gene selection
https://gabrielodom.github.io/pathwayPCA/
11 stars 2 forks source link

Add a warning if all levels of a categorical response are the same #91

Open gabrielodom opened 4 years ago

gabrielodom commented 4 years ago

If the user supplies a data frame with all the same label (for instance, all female), and attempts to run AES-PCA on this with the single-level factor as a response, two things will happen:

  1. the code will take 2-3 times longer to execute (no idea why), and
  2. all the p-values will be 0 (is this bad?)

Normally, this would not happen, as predicting the outcome of a variable that's always TRUE doesn't seem like a reasonable thing to do, so we should add a warning.