ahp.missing {ahpsurvey} | R Documentation |

## Impute missing observations using the method in Harker (1987)

### Description

Imputes the missing values of a list of matrices produced by `ahp.mat`

using the methods and assumptions made in Harker (1987). Missing values must be coded as `NA`

. As suggested in Harker (1987), a minimum of n-1 comparisons must be made, where n is the number of attributes (assuming that the decision-maker is perfectly consistent). Note that the algorithm assumes that the NA values will be imputed under perfect consistency with the other pairwise comparisons made.

### Usage

```
ahp.missing(ahpmat, atts, round = FALSE, limit = FALSE)
```

### Arguments

`ahpmat` |
A list of pairwise comparison matrices of each decision maker generated by |

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

`round` |
Rounds the imputation values of the matrix to the nearest integer if |

`limit` |
If set to |

### Value

A list of matrices with all `NA`

values imputed.

### Author(s)

Frankie Cho

### References

Harker P (1987).
“Incomplete pairwise comparisons in the analytic hierarchy process.”
*Mathematical Modelling*, **9**(11), 837 - 848.
ISSN 0270-0255, http://www.sciencedirect.com/science/article/pii/0270025587905033.

### Examples

```
library(magrittr)
atts <- c('cult', 'fam', 'house', 'jobs', 'trans')
data(city200)
set.seed(42)
## Make a dataframe that is missing at random
missing.df <- city200[1:10,]
for (i in 1:10){
missing.df[i, round(stats::runif(1,1,10))] <- NA
}
missingahp <- ahp.mat(missing.df, atts, negconvert = TRUE)
ahp.missing(missingahp, atts)
```

*ahpsurvey*version 0.4.1 Index]