ahp.missing: Impute missing observations using the method in... In ahpsurvey: Analytic Hierarchy Process for Survey Data

Description

Imputes the missing values of a list of matrices produced by `ahp.mat` using the methods and assumptions made in \insertCiteHarker1987;textualahpsurvey. Missing values must be coded as `NA`. As suggested in \insertCiteHarker1987;textualahpsurvey, 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

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

Arguments

 `ahpmat` A list of pairwise comparison matrices of each decision maker generated by `ahp.mat`. `atts` A list of attributes in the correct order `round` Rounds the imputation values of the matrix to the nearest integer if `TRUE`. Defaults to `FALSE`. `limit` If set to `TRUE`, if the imputation value is larger than 9 or smaller than 1/9, the value is converted to 9 and 1/9 respectively. Defaults to `FALSE`.

Value

A list of matrices with all `NA` values imputed.

Frankie Cho

\insertAllCited

Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14``` ```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 documentation built on March 26, 2020, 8 p.m.