CR {AHPtools}R Documentation

Saaty CR Consistency

Description

Computes and returns the Consistency Ratio for an input PCM and its boolean status of consistency based on Consistency Ratio

Usage

CR(PCM, typePCM = TRUE)

Arguments

PCM

A pairwise comparison matrix

typePCM

boolean flag indicating if the first argument is a PCM or a vector of upper triangular elements

Value

A list of 3 elements, a boolean for the 'CR' consistency of the input 'PCM', the 'CR' consistency value and the principal eigenvector

Examples

CR.pcm1 <- CR(matrix(
                 c(1,1,7,1,1, 1,1,5,1,1/3, 1/7,1/5,1,1/7,1/8, 1,1,7,1,1,
                 1,3,8,1,1), nrow=5, byrow=TRUE))
CR.pcm1
CR.pcm1a <- CR(c(1,7,1,1, 5,1,1/3, 1/7,1/8, 1), typePCM=FALSE)
CR.pcm1a
CR.pcm2 <- CR(matrix(
                  c(1,1/4,1/4,7,1/5, 4,1,1,9,1/4, 4,1,1,8,1/4,
                  1/7,1/9,1/8,1,1/9, 5,4,4,9,1), nrow=5, byrow=TRUE))
CR.pcm2
CR.pcm2a <- CR(c(1/4,1/4,7,1/5, 1,9,1/4, 8,1/4, 1/9),typePCM=FALSE)
CR.pcm2a

[Package AHPtools version 0.2.1 Index]