Hope you are all well, thanks for being active in the forums.
Continuing the discussion from Perf function: error in solve.default(Sr): system is computationally singular:
I’m also having an issue with my datasets in the
perf for (s)PLS-DA, in that it is returning the
system is computationally singular: reciprocal condition number =.
I’ve read the possible causes, so I tried to remove missing values with
near.zero.vars in the
plsda function. In terms of too many components being the cause, I used values <= 4, and it works - but the plot looks like this:
Perhaps suggesting 1 component? I’m working with a low number of samples (6 overall) for each dataset, of which there are 3 different omic datasets I am investigating before attempting integration.
Here’s the code I’ve used for the
MyResult.plsda<- plsda(data,factors, ncomp=4, near.zero.var = TRUE) MyPerf.plsda <- perf(MyResult.plsda, validation = "loo",dist = c("max.dist","centroids.dist"), progressBar = FALSE, nrepeat = 1) plot(MyPerf.plsda.trans, sd = TRUE, legend.position = "horizontal")
The only thing I have not investigated is “Potentially variables that are almost exactly the same (multi collinearity)”. I’ve not much of a clue on how to deal with this, apologies but I’m just starting out.
Thanks for any assitance offered.