read.xls.CATA: Reads the CATA data from an Excel File and creates a "Brick"...

View source: R/readCATACubeData.R

read.xls.CATAR Documentation

Reads the CATA data from an Excel File and creates a "Brick" of data to be analyzed by PTCA4CATA

Description

read.xls.CATA reads the CATA data from an Excel File and creates a Brick of Data 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 cross-validation methods such as permutations tests, 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 the help for the excel file OrangeJuiceCATARawData.xlsx for an example of how the excel file should be organized. @section Implementation Current version uses Wickham's readxl package and so does not need rJava. Current version: is July 11, 2017.

Usage

read.xls.CATA(
  path2file,
  sheet2read,
  orderProducts = TRUE,
  threshold4cleaning = 0
)

Arguments

path2file

the name of the xls file with the data.

sheet2read

the name of the sheet in the excel file.

orderProducts

if TRUE (default) alphabetically order the products.

threshold4cleaning

the cleaning threshold: The columns whose total is smaller than threshold4cleaning are eliminated from CleanedContingencyTable. Default: threshold4cleaning = 0 (i.e., columns with a zero sum are eliminated). To keep even the columns with a zero sum, use threshold4cleaning = -1

Value

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).

Author(s)

Herve Abdi


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