[R] Sum of sd between matrix cols vs spearman correlation between them

Petr Savicky savicky at cs.cas.cz
Thu Apr 5 18:44:31 CEST 2012


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.



More information about the R-help mailing list