Can one plot % of variance using the plotMDS function?
1
1
Entering edit mode
4.4 years ago
harelarik ▴ 90

When using PCA it is possible to plot what is the percentage of variance which is captured by Principle component 1 (x axis) and principle component 2 (y- axis).

Is it possible to describe how much of the variance is captured by the first and second dimension in plotMDS (limma package)?

Thank you,

Arik

limma plotMDS PCA PCoA % of varience • 4.3k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
0
Entering edit mode

The duplicate post was removed from support.bioconductor.org.

ADD REPLY
3
Entering edit mode
4.4 years ago
Gordon Smyth ★ 7.5k

plotMDS does not return the % variance explained by each dimension. The % variance explained is not generally defined for MDS.

Update June 2021

The internal mathematics of plotMDS has been rewritten so that it does now return % variance explained. In the new approach, any dimensions with negative eigenvalues (rare but possible) are dropped and the % returned for the other dimensions is relative to the sum of all positive eigenvalues. The plots produced by plotMDS are unchanged.

ADD COMMENT
1
Entering edit mode

Thank you very much.

If gene.section="common" is used is there a way to return the "% variance explained"?

ADD REPLY
0
Entering edit mode

If `gene.selection="common" then the MDS is equivalent to PCA and plotMDS could compute % var explained. But it doesn't. The help page help("plotMDS") explains what the function does and what information it returns.

The purpose of plotMDS is to see how the samples group. The purpose is not to perform dimension reduction, so I don't see how % var explained would be of much help. Hence I didn't implement it.

Instead I made sure that distances on the plot have a concrete interpretation in terms of fold-changes between the samples (leading logFC). That seems to me to be more important and useful.

ADD REPLY
0
Entering edit mode

Thank you very much for your kind help and support to the bioinformatics community.

Arik

ADD REPLY
0
Entering edit mode

Re: the update on June 2021: Does this mean that you run PCA and do MDS on that?

ADD REPLY
0
Entering edit mode

No it does not mean that. Why would we need to run PCA? The plotMDS function does what it is documented to do.

ADD REPLY

Login before adding your answer.

Traffic: 895 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6