plotLoadings dataframe

Hi

I’ve performed a plsda on 4 groups and have plotted the loadings on component 1 with plotLoadings(). While it makes sense given the biology information of my data, some loadings are positive and colored for group1 (correct) and I could equally expect them to be negative for group2. I just want to make sure I interpret correctly the loadings in the DF returned by plotLoadings. I see that this dataframe has:

[4 columns with contributions on each of the 4 groups, positive and negative, one column per group][contrib.4 columns with TRUE/FALSE to indicate which group is to be highlighted][contrib. - I dont know what this means][groupContrib. 1 column with labeling for coloring][color for legend][PC loading]

(edited) My questions are:

  1. Is the interpretation above correct?
  2. On the first 4 columns I see some negative values with larger absolute values than others. How do we define the contributions in this case? Does a negative contribution with larger absolute value for one class have a more insightful meaning than another that is positive but lower in absolute terms?
  3. How is the selection done for which group to color based on the loadings?

Thanks in advance

hi @rben,

Here is the code I ran for a PLSDA to answer this question:

data(breast.tumors)
X = breast.tumors$gene.exp
Y = breast.tumors$sample$treatment

plsda.breast = plsda(X, Y, ncomp = 2)

name.var = as.character(breast.tumors$genes$name)
names(name.var) = colnames(X)

# with gene IDs, showing the top 60
plotLoadings(plsda.breast, contrib = 'max', comp = 1, method = 'median', ndisplay = 60, name.var = name.var, size.name = 0.6, legend.color = color.mixo(1:2))

output.loading = plotLoadings(plsda.breast, contrib = 'max', comp = 1, method = 'median', ndisplay = 60,
name.var = name.var, size.name = 0.6, legend.color = color.mixo(1:2))
head(output.loading$X)

1 - yes your interpretation is correct. The group that contributes is based on the argument method (here the median, but maybe you chose the mean). Contrib: I dont know why this is not showing the help file of plotLoadings but contrib is an argument that states either min or max and by default it is ‘max’. So in your case we are indicating the group that has maximum mean / median.

2 - negative values are to be expected as we focus on the absolute value (the larger the better). The sign indicates opposition in contribution and has to be interpreted along a sample plot. You can also have a look at this example (for the interpretation): Koren Bodysites Case Study | mixOmics

3 - colours are by default so that it matches the other outputs, but can be chosen with the argument legend.color. Unless your question relate to how we define the contribution, in that case see 1.

Kim-Anh

terrific, many thanks for your comments!