# How are the plotVar coordinates (correlation circle plot) calculated?

In PCA the variable contribution to the latent features is shown by plotting the loadings matrix V.
X = UV’

What exactly is the plotIndiv function in Mixomics showing for PLS-DA?

hi @jonas87,

In PCA, you recalculate the components as U \Delta:

In PLS-DA we recalculate the components as t = Xa where a is normed and X is centered and scaled. I show the algorithm here for a PLS (generalisation of PLS-DA) to give you an idea:

Kim-Anh

Hi Kim, sorry I meant plotVar instead of plotIndiv. Plotvar shows the loadings right. How are the values shown in plotVar calculated?

@jonas87

It is the (Pearson) correlation between original centered and scaled data and the the components:

See line 310 in https://github.com/mixOmicsTeam/mixOmics/blob/master/R/plotVar.R:
`cord.X[[1]] = cor(object\$X, object\$variates\$X[, c(comp1, comp2, comp3)], use = "pairwise")`

And further described here (correlation circle plot interpretation):

Thank you Kim-Anh. I was able to reproduce the calculation of the plotvar values.
The use of Pearson corr between the X matrix and the matrix T of the x-scores, is this an invention of the mixOmics team? Is this described elsewhere in the litterature? Or if it’s your invention has this been adopted by others over the years?

Is it really equivalent to the PCA loadings plots? Variables close to each other are correlated, variables in opposite quadrants are inversely correlated and the further away from the origin the more they contribute to the corresponding latent components?

Could you give me the link to the full document that you gave the screenshot of?

Dear @jonas87,

The plotVar is not our invention, it is the classical way of plotting correlation circle plots for PCA (we then extended the concept for PLS and CCA, see https://biodatamining.biomedcentral.com/articles/10.1186/1756-0381-5-19

PlotVar is not equivalent to plotLoadings, as you can see from the mathematical description on how to calculate the coordinates in plotVar, but the interpretation you give is correct (but double check with both plots, as they are complementary).

The screenshot I gave you is part of our book which is currently being written, it might be out in 2021 and will be announced on our website.

Kim-Anh