citation.counts {tempR} | R Documentation |
Counts TCATA Citations and Observations for a Product and a Comparison Set
Description
Calculates how many times a specified product was checked and how many times a comparison set was checked.
The number of evaluations for the product and comparison set are also calculated,
along with a reference and decluttering matrix for plotting in tcata.line.plot
.
Usage
citation.counts(x, product.name = "", product.col = 1,
attribute.col = 2, results.col = NULL, comparison = "average")
Arguments
x |
matrix of TCATA 0/1 data with (Assessors x Products x Reps x Attributes) in rows with row headers and (Times) in columns |
product.name |
name of the product for which to calculate how many times a product was checked and not checked |
product.col |
index of column in |
attribute.col |
index of column in |
results.col |
indices of columns in |
comparison |
specifies whether the comparison will be with the average of all products ( |
Value
list object with three elements:
P1
matrix of counts for product specified byproduct.name
(attributes are in rows; times are in columns).Pn
number of observations forproduct.name
C1
matrix of counts for comparison set specified bycomparison
(dimensions equal toP1
.Cn
number of observations for the comparison set defined bycomparison
ref
a matrix of citation proportions for the comparison set specified bycomparison
(dimensions equal toP1
; can be used to draw a reference line; seetcata.line.plot
declutter
a matrix for decluttering in a line plot (dimensions equal toP1
; seeget.decluttered
References
Castura, J.C., AntĂșnez, L., GimĂ©nez, A., Ares, G. (2016). Temporal check-all-that-apply (TCATA): A novel temporal sensory method for characterizing products. Food Quality and Preference, 47, 79-90. doi:10.1016/j.foodqual.2015.06.017
Meyners, M., Castura, J.C. (2018). The analysis of temporal check-all-that-apply (TCATA) data. Food Quality and Preference, 67, 67-76. doi:10.1016/j.foodqual.2017.02.003
See Also
tcata.line.plot
, get.decluttered
Examples
# example using 'ojtcata' data set
data(ojtcata)
# comparison of Orange Juice 3 vs. all other OJs (1, 2, 4, 5, 6)
oj3.v.other <- citation.counts(ojtcata, product.name = "3", product.col = 2,
attribute.col = 4, results.col = 5:25, comparison = "other")
# show results
oj3.v.other
times <- get.times(colnames(ojtcata)[-c(1:4)])
attributes <- unique(ojtcata$attribute)
palettes <- make.palettes(length(attributes))
# plot results
tcata.line.plot(oj3.v.other$P1, n = oj3.v.other$Pn,
attributes = attributes, times = times,
line.col = palettes$pal, reference = oj3.v.other$ref, ref.lty = 3,
declutter = oj3.v.other$declutter, highlight = TRUE, highlight.lwd = 4,
highlight.col = palettes$pal.light,
height = 7, width = 11, legend.cex = 0.7, main = "Product 3 vs. Other Products")