Is it possible to draw e.g. 95% confidence ellipses around samples from the same group on the results from the plotMDS function under edgeR? If so, how?
Asked
Active
Viewed 642 times
9
-
2What does the 95% confidence correspond to? MDS doesn’t directly give confidence intervals. – Konrad Rudolph Jun 05 '17 at 17:28
-
That depends on whether or not you have a frequentist or bayesian view about confidence intervals. I would expect (from a bayesian interpretation) that the confidence ellipses on a 2D plot would contain 95% of the points that would be expected in a given sample group. – gringer Jun 05 '17 at 21:07
-
@gringer Hmm. For a typical experimental setup in NGS, a sample group contains < 10 points. Often < 5. So there’s a lot of uncertainty about the placement of the ellipses based on this. ;-) – Konrad Rudolph Jun 06 '17 at 11:40
-
I agree to what @KonradRudolph said. If your group has less < 10 or < 5 , in that case the ellipse criterion might not even hold true or I would not believe in it. First of all MDSplot might not be needed as well for doing the 95% ellipse as well. This link explains pretty well about its use. I am just thinking some times we do a lot of over-estimation or over-calculation of certain statistical measures which for the first choice might not be required. Do you even want to do that? https://stats.stackexchange.com/questions/217374/real-meaning-of-confidence-ellipse . – ivivek_ngs Jun 06 '17 at 14:08
-
The question assumes that the position on an MDS plot is a population parameter for a population from which each of the samples in the group are drawn from. It assumes that each sample is a point estimate of the population for that group. Under this interpretation, a confidence ellipse is a valid thing. However, i'm not sure position on an MDS plot can be called a population parameter due to the nature of how an MDS plot is constructed (specifcally the position of each sample is not independent of the position of the others). But perhaps some suitable parameter does exist? – Ian Sudbery Jun 06 '17 at 14:25
1 Answers
2
I can see that there would be a three step process to doing this:
Merge counts from all samples in the group and then resample pseudo-replicates from this. If
xis a matrix with samples in the group being columns and genes being rowss <- sample(row.names(x), n = mean(colSums(x)), probs=rowSums(x)/sum(rowSums(x)) stab <- table(s) s <- as.vector(stab) names(s) <- names(stab)Do this thousands of times.
You would then want to project those onto your MDS plot space - i'm less clear about how you could do this without perturbing the space itself.
Calculate the parameter for an ellipise that would contain 95% of these points. Again, I'm not so sure about how to do this, but I think the
carpacakge might be a good place to start looking.
Konrad Rudolph
- 4,845
- 14
- 45
Ian Sudbery
- 3,311
- 1
- 11
- 21