Produces an abundance vs time diagram.
# S4 method for IncrementTest autoplot(object, ..., level = 0.95, roll = FALSE, window = 3) # S4 method for IncrementTest,missing plot(x, level = 0.95, roll = FALSE, window = 3)
An object to be plotted.
Currently not used.
numeric vector giving the
logical scalar: should each time series be
subsetted to look for episodes of selection?
integer giving the size of the rolling
window. Only used if
Results of the frequency increment test can be displayed on an abundance
vs time diagram aid in the detection and quantification of selective
processes in the archaeological record. If
TRUE, each time
series is subsetted according to
window to see if episodes of selection
can be identified among decoration types that might not show overall
selection. If so, shading highlights the data points where
fit() identifies selection.
Displaying FIT results on an abundance vs time diagram is adapted from Ben Marwick's original idea.
data("merzbach", package = "folio") ## Coerce the merzbach dataset to a count matrix ## Keep only decoration types that have a maximum frequency of at least 50 keep <- apply(X = merzbach, MARGIN = 2, FUN = function(x) max(x) >= 50) counts <- as_count(merzbach[, keep]) ## Group by phase ## We use the row names as time coordinates (roman numerals) dates <- as.numeric(utils::as.roman(rownames(counts))) ## Frequency Increment Test freq <- fit(counts, dates) ## Plot time vs abundance and highlight selection plot(freq) plot(freq, roll = TRUE, window = 5)