Hi everyone,
I ran into an issue I cannot fix. I am performing PCA on several metabolomics datasets, most of which run without any problem.
Two datasets are producing unexpected results, both sharing a high proportion of missing values (dataset A → 37% and dataset B → 17% of missing values).
Dataset A has a value distribution ranging from 0 to 25, with 29 variables, and non-zero variance. For this dataset, I obtain a higher explained variance for component 2 (55%) than for component 1 (50%).
Dataset B has a value distribution ranging from −30 to 30, with 27 variables, and non-zero variance. For this dataset, I obtain an aberrant explained variance for component 1 (248113%).
However, when running the same pipeline on the same data using the ropls package instead of mixOmics, the score plots are visually identical between both packages.
Only the explained variance percentages differ, and appear more realistic with ropls (dataset A: PC1 → 26%, PC2 → 10%; dataset B: PC1 → 21%, PC2 → 19%).
For mixOmics, I am using:
pca.result ← pca(data, logratio = ‘none’, ncomp = x, center = TRUE, scale = TRUE)
For ropls, I am using:
pca.result ← opls(data, predI = x, scaleC = “standard”, log10L = FALSE)
In both packages, missing values are handled internally by the NIPALS algorithm.
Does anyone know where this difference could come from ?
Thank you in advance for your help,
Paul