On 13/08/14 07:57, Ron Michael wrote:
Hi,

I would need to get a clarification on a quite fundamental statistics property, 
hope expeRts here would not mind if I post that here.

I leant that variance-covariance matrix of the standardized data is equal to 
the correlation matrix for the unstandardized data. So I used following data.

<SNIP>

(t(Data_Normalized) %*% Data_Normalized)/dim(Data_Normalized)[1]



Point is that I am not getting exact CORR matrix. Can somebody point me what I 
am missing here?

You are using a denominator of "n" in calculating your "covariance" matrix for your normalized data. But these data were normalized using the sd() function which (correctly) uses a denominator of n-1 so as to obtain an unbiased estimator of the population standard deviation.

If you calculated

   (t(Data_Normalized) %*% Data_Normalized)/(dim(Data_Normalized)[1]-1)

then you would get the same result as you get from cor(Data) (to within about 1e-15).

cheers,

Rolf Turner

--
Rolf Turner
Technical Editor ANZJS

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to