Hi, I am running the following code:
plotLoadings(final.splsda, comp = 2, contrib = ‘max’, method = ‘median’,size.name = 0.3)
I thought the orange bars would be on one side where upregulated and the blue bars would be on otherside where upregulated. Why are they crossing over?
The colours of the bars are defined by the two parameters you set, namely
contrib = ‘max’ and
method = ‘median’. If the bar is blue, it means that for that variable, the
HC class had the maximal (
contrib) median value (
Thank you. I was just wondering what determines the direction of the bars?
The direction and length of the bars denotes the “loading value” which is defined as follows:
components are linear combinations of features . Loadings represent the weights (or coefficients) assigned to each of the features to determine their contribution to a given component .
Taken from the mixOmics Glossary.
So the direction tells you whether the loading value is negative or positive while it’s length tells you the absolute strength of that value. The colour describes how a given feature distinguishes your classes.