qd_pci2.Rd
Calculates the potential conflict index based on the distance matrix between responses.
qd_pci2(
x,
scale_values = c(-2:2),
x_is_table = FALSE,
m = 1,
p = 1,
print = FALSE
)
PCI-score (potential for conflict index)
if (FALSE) { # \dontrun{
set.seed(201)
Xv <- sample(-2:2, size = 100, replace = TRUE) #random responses
Yv <- rep(c(-2,2),50) #most extreme difference
Zv <- rep(2,100) #minimal difference
#qd_pci2 - using D2 (m=1)
qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0.37
qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 1
qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 1, p = 1) # 0
qd_pci2(Xv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0.31
qd_pci2(Yv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 1
qd_pci2(Zv, scale_values = -2:2, x_is_table = FALSE, m = 2, p = 1) # 0
} # }