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)

Arguments

object, x

An object to be plotted.

...

Currently not used.

level

A length-one numeric vector giving the confidence level.

roll

A logical scalar: should each time series be subsetted to look for episodes of selection?

window

An odd integer giving the size of the rolling window. Only used if roll is TRUE.

Value

  • autoplot() returns a ggplot object.

  • plot() is called it for its side-effects: it results in a graphic being displayed (invisibly returns x).

Details

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 roll is 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.

Note

Displaying FIT results on an abundance vs time diagram is adapted from Ben Marwick's original idea.

See also

fit()

Other plotting methods: plot_aoristic, plot_event, plot_mcd, plot_time()

Author

N. Frerebeau

Examples

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)