ali_protocol
2012-Apr-05 14:46 UTC
[R] Sum of sd between matrix cols vs spearman correlation between them
Hi all, I have a matrix (n*2), I want to compare 2 operators (2 normalization for array results) on these matrix. The 2 columns should ideally become the same after operations (normalization). So to compare operations, I do this for each normalization: s= sum (apply (normalized.matrix, 2,sd)) c= cor (normalized[,1],normalized [,2], method='pearson') I expect that if normalization 1 is superior, s should be less and c greater than normalization2, but both s and c change in 1 direstion. Is this possible or am I doing something wrong? Thank you in advance. -- View this message in context: http://r.789695.n4.nabble.com/Sum-of-sd-between-matrix-cols-vs-spearman-correlation-between-them-tp4535057p4535057.html Sent from the R help mailing list archive at Nabble.com.
Petr Savicky
2012-Apr-05 16:44 UTC
[R] Sum of sd between matrix cols vs spearman correlation between them
On Thu, Apr 05, 2012 at 07:46:52AM -0700, ali_protocol wrote:> Hi all, > > I have a matrix (n*2), I want to compare 2 operators (2 normalization for > array results) on these matrix. > The 2 columns should ideally become the same after operations > (normalization). So to compare operations, > I do this for each normalization: > > s= sum (apply (normalized.matrix, 2,sd)) > c= cor (normalized[,1],normalized [,2], method='pearson') > > > I expect that if normalization 1 is superior, s should be less and c greater > than normalization2, but both s and c change in 1 direstion. Is this > possible or am I doing something wrong?Hi. Is "normalized.matrix" and "normalized" the same matrix? Can you specify, which operators you use for normalization? Without having this information, i guess that comparing the correlations alone can be used, since it does not depend on the scaling the numbers. By an appropriate scaling factor, the sd may be changed to any value, but this does not say much about the amount of information in the data. On the other hand, the correlation does not change by scaling, so it may be a more reliable measure. Note that apply(normalized.matrix, 2, sd) is the same as sd(normalized.matrix) Hope this helps. Petr Savicky.
Possibly Parallel Threads
- Bioconductor. MA plot for qPCR array
- How to create a matrix with 3 dimensions from several 2 dimensional matrice?
- A introductory question about Zips law (Newbie to statistics)
- Apply a loop containing a function on a list
- How to it a "loess curve" and obtain the equation in R?