Re: [R] Converting variance covariance matrix to correlation matrix

2008-05-19 Thread Peter Dalgaard
Peter Dalgaard wrote: > Arun Kumar Saha wrote: >> Suppose I have a Variance-covariance matrix A. Is there any fast way to >> calculate correlation matrix from 'A' and vice-versa without emplying >> any >> 'for' loop? >> > C <- cov2cor(A) > > The other way around is ill-defined, but if d is the v

Re: [R] Converting variance covariance matrix to correlation matrix

2008-05-19 Thread Dimitris Rizopoulos
; <[EMAIL PROTECTED]> To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Monday, May 19, 2008 8:32 AM Subject: [R] Converting variance covariance matrix to correlation matrix Suppose I have a Variance-covariance matrix A. Is there any fast way to calculate correlati

Re: [R] Converting variance covariance matrix to correlation matrix

2008-05-19 Thread Peter Dalgaard
Arun Kumar Saha wrote: Suppose I have a Variance-covariance matrix A. Is there any fast way to calculate correlation matrix from 'A' and vice-versa without emplying any 'for' loop? C <- cov2cor(A) The other way around is ill-defined, but if d is the vector of variances, d <- sqrt(diag(A)) A

[R] Converting variance covariance matrix to correlation matrix

2008-05-18 Thread Arun Kumar Saha
Suppose I have a Variance-covariance matrix A. Is there any fast way to calculate correlation matrix from 'A' and vice-versa without emplying any 'for' loop? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.