Displaying 1 result from an estimated 1 matches for "tp4676395p4676450".
2013 Sep 18
2
cov2cor exp
...ix
S=(t(D)%*%D)/(nrow(x)-1)#Covariance matrix
R=function(S){###R is a Correlation matrix###
V=matrix(nrow=nrow(S),ncol=ncol(S))
V1 <- sqrt(1/diag(S))
diag(V)=V1
V[is.na(V)]=0
R=V%*%S%*%V
return(R)
}
R(S)
--
View this message in context: http://r.789695.n4.nabble.com/cov2cor-exp-tp4676395p4676450.html
Sent from the R help mailing list archive at Nabble.com.