Closed RP87 closed 8 years ago
@RP87 : Hmm, unfortunately I have no access to the paper. I did double check though, and I can confirm your results. I did check 2 things, though:
To be completely honest with you, I'm far from being the ultimate capacity in the field, so any feedback from the community is more than welcome.
Hi, I'm myself no maths star. But I suppose will improve while digging into this.
It troubles me that you confirmed my results with the previously proposed matrix. On my side I checked wikipedia's case (here below) and thought the issue was from my ahp (and dependencies) installation. But then you should have get a different result from mine on Saaty's example.
> cost = c(1,3,3,7)
> safety = c(1.0/3,1,1,9)
> capacity = c(1.0/3,1,1,7)
> style = c(1.0/7,1.0/9,1.0/7,1)
> mat = data.frame(cost,safety,capacity,style)
> PrioritiesFromPairwiseMatrixEigenvalues(mat, allowedConsistency = 1)
$priority
1 2 3 4
0.0561392 0.1148294 0.1201882 0.7088432
$consistency
[1] 0.07379078
> PrioritiesFromPairwiseMatrixMeanNormalization(mat)
$priority
[1] 0.05970684 0.12230233 0.12798415 0.69000668
$consistency
[1] NA
> PrioritiesFromPairwiseMatrixGeometricMean(mat)
$priority
[1] 0.05455313 0.11678162 0.12435425 0.70431100
$consistency
[1] NA
I also looked at the pmr documentation and something puzzles me in the arguments :
dset an “A” matrix. It should be a square matrix with diagonal values equal 1 and $a_ij = 1/a_ij$. It has no interaction with the current divergent results (this condition is ok with the example from table 3 in Saaty's publication) but it could be an issue for me when a_ij != 1/a_ij. (ex : 4 vs 1/5 instead of 1/4).
I'll send you a spreadsheet with alternative checking.
CU Rudy
Hi, I only have little time to check today, but I think you have your matrix transposed, because the data.frame will assemble by column. Try this instead:
cost = c(1,3,3,7)
safety = c(1.0/3,1,1,9)
capacity = c(1.0/3,1,1,7)
style = c(1.0/7,1.0/9,1.0/7,1)
nms <- c("cost", "safety", "capacity", "style")
mat <- matrix(c(cost, safety, capacity, style), nrow = 4, byrow = TRUE, dimnames = list(nms, nms))
PrioritiesFromPairwiseMatrixEigenvalues(mat)
And you should get:
$priority
cost safety capacity style
0.51007502 0.23435219 0.21505404 0.04051875
$consistency
[1] 0.07379078
You nailed it.
It was the use of data.frame that puts data in column.
Thanks.
Hi, I can't match the results of Saaty's publication. Decision making — the Analytic Hierarchy and Network Processes (AHP/ANP)
From the article (table 3: "Criteria weights with respect to the goal")
The following Priorities
are given for the following matrix :
In R code :
Hope the issue is on my side. Double checking would be nice.
(Ubuntu 14.04 ; Rstudio 0.98.1062 ; don't know command line to list all linked packages with versions : do not hesitate to indicate command to be run for useful further informations)
BR Rudy