search for: mlav

Displaying 1 result from an estimated 1 matches for "mlav".

Did you mean: clav
2010 Feb 01
1
How to repeat "for" function?
...t B num1=rep(1:n) for(i in 1:n)num1[i]=pc[1]%*%X[i,1] num2=rep(1:n) for(i in 1:n)num2[i]=pc[2]%*%X[i,2] num3=rep(1:n) for(i in 1:n)num3[i]=pc[3]%*%X[i,3] num4=rep(1:n) for(i in 1:n)num4[i]=pc[4]%*%X[i,4] den=rep(1:n) for(i in 1:n)den[i]=pc%*%X[i,] r1=num1/den r2=num2/den r3=num3/den r4=num4/den MLAV=sum(r2>r1 & r2>r3 & r2>r4) MLAV Best regards, ayu -- View this message in context: http://n4.nabble.com/How-to-repeat-for-function-tp1458806p1458806.html Sent from the R help mailing list archive at Nabble.com.