[R] how I can explore the variable names in my covariance matrix?

malcolm stat_2010 at hotmail.com
Mon Mar 5 06:14:10 CET 2012


QQ<-diag(7)
for (j in 1:7){
for (k in 1:7){
sum=0
for (i in 1:50){
sum=sum+(Y[i,j]-mean(Y[,j]))*(Y[i,k]-mean(Y[,k]))
}
QQ[j,k]=sum/49
}
}
round(QQ,2)
this is the function I made


--
View this message in context: http://r.789695.n4.nabble.com/how-I-can-explore-the-variable-names-in-my-covariance-matrix-tp4445149p4445180.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list