Error when trying to compute multilevelpca

Hello,

I am trying to run a multilevel pca on timecourse experiment. Some samples at different times have been obtained on the same indivdual, but some individual have been collected at one timepoint

table(sampleInfo[,“Individu”])

Macroplasme 1 Macroplasme 2 Macroplasme 3 Macroplasme 4 Macroplasme 5 Macroplasme 6
1 4 1 4 1 3

When I try to run the multilevel PCA, I got an error message

resMPCA ← mixOmics::pca(t(PC_before_log), scale= FALSE, center=FALSE, multilevel=sampleInfo[,“Individu”])
Erreur : Multilevel analysis can only be performed when at least one sample is repeated.

Either I missed something in the documentation or the error message should be
Erreur : Multilevel analysis can only be performed when all samples are repeated at least once

Thank you in advance for your help
Best regards

hi @ljouneau,

Thanks for the suggestion. I agree this error can be misleading. @aljabadi could we change to ‘when all samples are repeated at least once’? Thanks!

Kim-Anh

1 Like

Hi @ljouneau,

Thanks for reporting this. This will be fixed in the next version :slight_smile:

Best,

Al

Hello - I came across the same issue. Is it possible to apply the multi-level adjustment even when some samples are only collected at one timepoint? It would be great to not have to omit those samples with only one timepoint… thanks