Displaying 1 result from an estimated 1 matches for "poscompa".
2012 Apr 09
1
Pairwise comparison matrix elements
...;) 
w <- abs(Re(eigen(M)$vectors[,1]))
v <- abs(Re(eigen(t(M))$vectors[,1]))
w <- w/sum(w)
v <- v/(t(v)%*%w) 
S <- (v%*%t(w))/as.vector(t(v)%*%w)
S
n<- length(S)
M.comp <- array(S,dim=c(n,n,n,n))
for (i in 1:n) {
for (j in 1:n) {
for (k in 1:n) {
for (l in 1:n) {
poscompa[1,3,1,j-1] <- S[i,j]<=S[k,l] # if=1, then TRUE and if=0, then FALSE 
}}}}
M.comp
sum(poscompa[1,3,1,1:n]) # should give me the value for n. I know this doesn't test it accurately, but first I need to get the loops to work right.
I'm getting an array of errors such as "can'...