ahp.mat {ahpsurvey} | R Documentation |

## Generate AHP pairwise matrices from survey data

### Description

`ahp.mat`

takes in paired comparisons from survey data with questions using the
analytic hierarchy process and converts it into pairwise comparison matrices
for each individual decision-maker. Examples based on Saaty (2004).

### Usage

```
ahp.mat(df, atts, negconvert = FALSE, reciprocal = TRUE)
```

### Arguments

`df` |
a dataframe, each row corresponding to one decision-maker, with columns ordered according to |

`atts` |
a list of attributes in the correct order |

`negconvert` |
logical, whether to convert all positive values to
negative. In the pairwise comparison A_B, if -6 denotes A is more
important than B by 6 units, set |

`reciprocal` |
logical, whether to convert negative values (after |

### Value

A list of pairwise comparison matrices of each decision-maker.

### Author(s)

Frankie Cho

### References

Saaty TL (2004).
“Decision making — the Analytic Hierarchy and Network Processes (AHP/ANP).”
*Journal of Systems Science and Systems Engineering*, **13**(1), 1–35.
ISSN 1861-9576, doi: 10.1007/s11518-006-0151-5, https://doi.org/10.1007/s11518-006-0151-5.

### Examples

```
data(city200)
atts <- c('cult', 'fam', 'house', 'jobs', 'trans')
ahp.mat(df = city200, atts = atts, negconvert = TRUE)
```

*ahpsurvey*version 0.4.1 Index]