0

Trying to build my own AHP description in relation with the AHP R package: https://cran.r-project.org/web/packages/ahp/vignettes/file-format.html

When running the following AHP https://gist.github.com/Edouard-Legoupil/cac9f4ca6130ce10e4a078ab143c1ec1 , I have this error:

 Error in FUN(newX[, i], ...) : invalid 'type' (list) of argument

What am I missing?

Do I need to define a pairwiseFunction ? If yes, how and where?

Thanks in advance!

user3148607
  • 191
  • 11
  • You need to define the preferences for your alternatives, as is done in the vacation example in the package. There is also a vignette defining the file format: https://cran.r-project.org/web/packages/ahp/vignettes/file-format.html . In short, you may define either pairwise preferences, a pairwiseFunction, a score, or a scoreFunction. – Christoph Glur Nov 21 '17 at 11:21
  • Thanks, but I thought pairwise preference were already defined - see line 23 - – user3148607 Nov 21 '17 at 15:13
  • So my understanding was: 1. you define alternatives and value for the criteria 2. you record the pairwise comparison for the criteria as expressed by the decision maker --> 3. you can get the weight than once applied to the criteria value will allow to compute preference... What am I missing? – user3148607 Nov 21 '17 at 15:35
  • Classical AHP: 1.) you define hierarchy of criteria. 2.) For each node, you define pairwise preferences. 3.) For each leaf in the criteria hierarchy tree, you define pairwise preferences for the alternatives. With the ahp package, you CAN replace 2.) or 3.) with a pairwise preferenceFunction, a score, or a scoreFunction. In the functions, you can use the attributes you defined in the alternative section of the file. But you MUST tell the Calculate method what the preferences are for the alternatives. I strongly encurage you to start with the working example files. – Christoph Glur Nov 21 '17 at 16:54

0 Answers0