View source: R/readCATACubeData.R
createCube4CATA | R Documentation |
take a df containing CATA data and create the CATA 0/1/ Data Brick and a contingency table. The contingency table can be analyzed by correspondence analysis or Hellinger analysis. The cube of data is needed to perform correct pemutations test and to compute bootstrap confidence intervals and bootstrap ratios. With I products, J adjectives and K judges The data in the excel file are organized as: row 1 column 1 = name of Judge 1 row 1 columns (2 to J+1) name of the adjectives row 2 column 1 = name of product 1. row 2 column (2 to J+1) 0/1 answers of Judge 1 to the J adjectives for product 1 .... row I+1 column 1 = name of product I row 2 column (2 to J+1) 0/1 answers row I+2 column 1 = name of product 1. row 2 column (2 to J+1) 0/1 answers of Judge 2 to the J adjectives for product 1 .... And so on till the last judge. See df ***** as data for an example Current version uses XLConnect, and so needs JAVA and rJava A newer version is likely to use Wickham's readxl package
createCube4CATA(df, orderProducts = TRUE, threshold4cleaning = 0)
df |
a data frame with the CATA data (coded as indicated above) |
orderProducts |
if TRUE (default) alphabetically order the products. |
threshold4cleaning |
a threshold: the columns whose total
is smaller than |
A list with CATA.Brick
a product by adjective by judge Brick of 0/1 data
(1 if judge chose adjective for product, 0 if not);
ContingencyTable
:
A product by adjective contingency table;
CleanedContingencyTable
:
A product by adjective cleaned contingency table
(columns whose sum is equal or below threshold are dropped).
Herve Abdi
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.