fuzzyRanking: recode rating data (e.g., Lickert type scale) into a fuzzy...

View source: R/fuzzyRanking.R

fuzzyRankingR Documentation

recode rating data (e.g., Lickert type scale) into a fuzzy code (a.k.a. doubling, or thermometer code) creating 2 columns per variable.

Description

fuzzyRanking: recodes a rank or Lickert type scale into a fuzzy code (a.k.a. doubling, or thermometer coding). fuzzyRanking is used to recode rating scale data prior to performing Multiplle Correspondence Analysis on this type of data.

Usage

fuzzyRanking(X, min = NULL, max = NULL, neg.mark = ".neg", pos.mark = ".pos")

Arguments

X

an I by J matrix where the rows are objects or stimuli and the columns are variables. At the intersection of a row and a column is the rating for the object in the row for the variable in the column.

min

(default = NULL) the minimum value(s) for the scale. if NULL (default), the min is computed per column, if min is a scalar it is used for all column, if min is a vector of length J, is is used for the columns.

max

(default = NULL) (default = NULL) the maximum value(s) for the scale. if NULL (default), the max is computed per column, if max is a scalar it is used for all column, if max is a vector of length J is is used for the columns.

neg.mark

(default = '.neg') the suffix for the negative side of the scale.

pos.mark

(default = '.pos') the suffix for the positive side of the scale.

Details

Each column is recoded as two columns: The first one expresses the distance to the negative pole of the scale and the second one expresses the distance to the positive pole. For example for a 5 point Lickert scale going from 1 to 5, a value of 2 will be recoded as d.neg = 1/4 and d.pos = 3/4. Note that d.neg and d.pos always sum to 1.

If X has no column names, the columns will be named V1 to VJ in the output.

Value

a data frame (or a matrix).

Author(s)

Hervé Abdi

References

Greenacre M. (2017). Correspondence Analysis in Practice. Boca Raton: CRC Press. pp 201-208.

Examples

Y <- matrix(c(1,5,2,4,1,4,2,2), nrow = 4)
fuzzy.Y <- fuzzyRanking(Y)

HerveAbdi/PTCA4CATA documentation built on July 17, 2022, 5:41 a.m.