A statistical graphic designed for the archaeological study of the timing of the occurrence of events.
OccurrencePlot(data, position, plot.result = NULL, level = 0.95,
intervals = "CI",
title = "Occurrence plot",
subtitle = NULL,
caption = "ArchaeoPhases",
labelXaxis = "Calendar year",
labelYaxis = NULL,
language = "English", occurrence = "occurrence",
height = 7, width = 7, units = "in",
x.min = NULL, x.max = NULL, x.scale = "calendar",
elapsed.origin.position = NULL,
dumbbell.size = 1, dot.guide = FALSE,
dot.guide.size = 0.25, y.grid = FALSE,
file = NULL,
newWindow=TRUE, print.data.result = FALSE)dataframe containing the output of the MCMC algorithm. The MCMC samples should be in calendar year (BC/AD).
numeric vector containing the position of the column corresponding to the MCMC chains of interest
a list containing the data to plot, typically the result of a previous run of OccurrencePlot()
probability corresponding to the level of confidence used for the credible interval
"CI" corresponds to the credible intervals, "HPD" to the highest density regions
title of the graph
subtitle of the graph
caption of the graph
x axis label of the graph
y axis label of the graph
English by default
Text for the y-values
height of the graph in units
width of the graph in units
recognized by ggsave function, one of "in", "cm", "mm"
minimum x axis value
maximum x axis value
one of "calendar" for calendar years, "BP" for years before present, or "elapsed" for years after a specified origin
the position of the column corresponding to the origin for elapsed time calculations
size of the symbols used to plot dates
switch for guides from y-axis to plot symbols
size of the dot guides
switch for horizontal grids
the name of the file to be saved. If NULL then no graph is saved.
whether the plot is drawn within a new window or not
If TRUE, the list containing the data to plot will be given
It calculates the calendar date t corresponding to the smallest date such that the number of events observed before t is equal to k. The result is given in calendar year (in format BC/AD). It may also return a list containing the data to plot (if print.data.result = TRUE).
If we have k events. We can estimate the calendar date t corresponding to the smallest date such that the number of events observed before t is equal to k. The OccurrencePlot estimates theses dates and give the credible interval or the highest posterior density (HPD) region of theses dates associated to a desired level of confidence.
# NOT RUN {
data(Events);
OccurrencePlot(Events[1:1000,], c(2:5), print.data.result = FALSE)
# }
Run the code above in your browser using DataLab