tcata.diff.plot: TCATA difference plot

View source: R/tcata.R

tcata.diff.plotR Documentation

TCATA difference plot

Description

Plots TCATA difference curves.

Usage

tcata.diff.plot(x1 = x1, x2 = NA, n1 = 1, n2 = NA,
attributes = c(), times = c(), lwd = 1,
declutter = NA, get.decluttered = FALSE, emphasis = NA, alpha = 0.05, emphasis.lwd = 3,
main = "", height = 8, width = 12,
xlab = "Time", ylab = "Difference in citation proportion",
axes.font = 1, axes.cex = 1, line.col = c(), x.increment = 5,
legend.cex = 1, legend.font = 1, save.as = "")

Arguments

x1

matrix of difference proportions, or of counts if n1 specified. If mat2 specified then proportions or counts apply to first sample. Attributes are in rows, times in columns.

x2

matrix of proportions for second sample, or of counts if n2 specified.

n1

number of observations for first sample

n2

number of observations for second sample

attributes

vector of attribute labels for row in x1 (and x2)

times

vector of times for columns in x1 (and x2)

lwd

Line width

declutter

indicator matrix with same dimensions of x1 to suppress output

get.decluttered

if TRUE then calculates the declutter matrix from get.mat.diff.sign

emphasis

set to 1 to emphasize significant differences

alpha

significance level for entrywise test of x1 and x2 (if counts)

emphasis.lwd

line weight for emphasizing significant differences

main

plot title; see plot

height

plot height

width

plot width

xlab

label for x axis

ylab

label for y axis

axes.font

Font for axes labels; see par.

axes.cex

Size for axes labels.

line.col

line color for attribute lines

x.increment

increment between time labels on x axis

legend.cex

symbol size for legend

legend.font

Font for the legend; see text.

save.as

Filename to use if file will be saved.

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. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.foodqual.2015.06.017")}

Examples

# difference between High and Low ethanol wines (sip 1)
x.diff.raw <- t(syrah[seq(1, 1026, by = 6), -c(1:4)]) -
                t(syrah[seq(3, 1026, by = 6), -c(1:4)])
x.diff.smooth <- get.smooth(x.diff.raw, low.bound = -1, up.bound = 1)
colnames(x.diff.smooth) <- colnames(x.diff.raw) <- times <- 10:180
tcata.diff.plot(x1 = x.diff.smooth, attributes = rownames(x.diff.smooth), times = times, lwd = 2,
                main = "Sip 1 differences: High-ethanol wine - Low-ethanol wine")

# an example based on the syrah data set (truncated for efficiency)
n <- 52
H1 <- t(syrah[seq(1, 126, by = 6), -c(1:4)] * n)
L1 <- t(syrah[seq(3, 126, by = 6), -c(1:4)] * n)
colnames(H1) <- colnames(L1) <- times <- 10:30
tcata.diff.plot(x1 = H1, x2 = L1, n1 = n, n2 = n,
                attributes = rownames(H1), get.decluttered = TRUE, lwd = 2)

tempR documentation built on Sept. 8, 2023, 5:19 p.m.

Related to tcata.diff.plot in tempR...