Bill,
I can reproduce Coyle's results (see 'm weigh_iter 5') if I use the
first iteration of finding the right eigenvector - this has been the
tradition in AHP, at least in the early days.
There are ongoing discussions between using inexact vs exact weights and
between using left or right eigenvectors. Saaty prefers right
eigenvector. If the pairwise comparisons have been made by people, then
the differences (exact / inexact, left/right) are usually so small that
the results are more sensitive to subjective assessments.
I have added a verb for calculating the exact error of each pairwise
comparison and a verb for "correcting" pairwise comparisons. If the
pairwise comparisons have been made by people, then the same people
should usually correct their mistakes and automatic correction should be
prohibited.
Anyways, the real fun begins with incomplete comparison matrices.
Hope this helps,
Tarmo
load 'user\projects\ahp_jverbs_2march2006.txt'
+m=:1 1r3 5 1,3 1 5 1,1r5 1r5 1 1r5,: 1 1 5 1
1 1r3 5 1
3 1 5 1
1r5 1r5 1 1r5
1 1 5 1
weigh m
0.231946 0.401743 0.0610517 0.305259
m weigh_iter 5
0.231946 0.401743 0.0610517 0.305259
0.232346 0.410252 0.059567 0.297835
0.232322 0.409926 0.0596252 0.298126
0.232323 0.409949 0.0596214 0.298107
0.232323 0.409949 0.0596214 0.298107
weigh_exact m
0.232323 0.409949 0.0596214 0.298107
%/~ weigh_exact m NB. corrected comparison values based on exact weights
1 0.566713 3.89664 0.779328
1.76456 1 6.87586 1.37517
0.256631 0.145436 1 0.2
1.28316 0.727181 5 1
errt m NB. error matrix i.e. exact errors of comparison values
1 3 0.57735 0.57735
0.333333 1 1.73205 1.73205
1.73205 0.57735 1 1
1.73205 0.57735 1 1
errt_auto m NB. corrected comparison values based on exact
errors of comparison values
1 0.57735 3.79918 0.759836
1.73205 1 6.58037 1.31607
0.263215 0.151967 1 0.2
1.31607 0.759836 5 1
NB. load 'user\projects\ahp_jverbs_2march2006.txt'
ts =: 6!:2, 7!:[EMAIL PROTECTED]
9!:3(5)
mp =: +/ .*
product =: */
am =: +/ % # NB. arithmetic mean
geomean =: # %: product NB. geometric mean
NB. geomean_log =: 13 : '^ am ^. y.'
weigh =: 13 : '(% +/)~ geomean"1 y.' NB. the first iteration of
weighing
log_weigh =: 13 : '(% +/)~ ^ am"1 ^. y.' NB. the first iteration of
weighing using logscale, useful for large Saaty matrices
NB. table weigh_iter 5
weigh_iter =: 13 : 'log_weigh"2 mp~ ^: (i.y.) x.' NB. computing weight
iterations
eigenvalue =: 13 : '+/ (+/y.) * log_weigh y.' NB. largest eigenvalue
(based on the 1st iteration)
aci =: 13 : 'eigenvalue y.)-#y.) % (_1 + #y.)' NB. absolute consistency of a
Saaty matrix (based on the 1st iteration)
mpnorm =: 13 : 'mp~ (% eigenvalue)~ y.' NB. normalize matrix product
weigh_exact =: log_weigh mpnorm ^: _ NB. weigh_exact table
errt =: 13 : '^ ((y * n) + ys +/ (- ys=. +/ y=. ^. y.)) % (2 - n=. #y.)'
NB. error weights matrix
NB. Saaty matrix with comparison values corrected
errt_auto =: 13 : 'y. * ( (#y.) % _2 + #y.) %: errt y.' NB. errt_auto
table
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm