zellerlab / siamcat

R package for Statistical Inference of Associations between Microbial Communities And host phenoType
https://siamcat.embl.de/
51 stars 16 forks source link

variables with more 2 states #36

Open drelo opened 2 years ago

drelo commented 2 years ago

Hi again, sorry if this is explained elsewhere but can we feed a variable (like drug or treatment) that has more than 2 states? I performed the SIAMCAT analysis with age, response and gender with no issues. But I added therapy as another variable (there are NAs + 3 classes of therapy) and drug (6 classes + NAs) and the cofounder step fails and I got an error regarding the variables

Error in factor(mvar, levels = sort(unique(na.omit(mvar))), labels = var.level.names[[m]]) : 
  invalid 'labels'; length 0 should be 1 or 6

Thanks in advance for your help