Learn R Programming

kairos (version 2.1.1)

plot_mcd: MCD Plot

Description

MCD Plot

Usage

# S4 method for MeanDate,missing
plot(
  x,
  calendar = getOption("kairos.calendar"),
  decreasing = TRUE,
  main = NULL,
  sub = NULL,
  ann = graphics::par("ann"),
  axes = TRUE,
  frame.plot = axes,
  panel.first = NULL,
  panel.last = NULL,
  ...
)

# S4 method for SimulationMeanDate,missing plot( x, calendar = getOption("kairos.calendar"), interval = "student", level = 0.8, decreasing = TRUE, main = NULL, sub = NULL, ann = graphics::par("ann"), axes = TRUE, frame.plot = axes, panel.first = NULL, panel.last = NULL, ... )

Value

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

Arguments

x

A MeanDate object.

calendar

An aion::TimeScale object specifying the target calendar (see calendar()).

decreasing

A logical scalar: should the sort be increasing or decreasing?

main

A character string giving a main title for the plot.

sub

A character string giving a subtitle for the plot.

ann

A logical scalar: should the default annotation (title and x, y and z axis labels) appear on the plot?

axes

A logical scalar: should axes be drawn on the plot?

frame.plot

A logical scalar: should a box be drawn around the plot?

panel.first

An an expression to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids.

panel.last

An expression to be evaluated after plotting has taken place but before the axes, title and box are added.

...

Further graphical parameters.

interval

A character string giving the type of confidence interval to be returned. It must be one "student" (the default), "normal", "percentiles" or "range" (min-max). Any unambiguous substring can be given.

level

A length-one numeric vector giving the confidence level. Only used if interval is not "range".

Author

N. Frerebeau

See Also

mcd()

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

Examples

Run this code
## Data from Peeples and Schachner 2012
data("zuni", package = "folio")

## Set the start and end dates for each ceramic type
dates <- list(
  LINO = c(600, 875), KIAT = c(850, 950), RED = c(900, 1050),
  GALL = c(1025, 1125), ESC = c(1050, 1150), PUBW = c(1050, 1150),
  RES = c(1000, 1200), TULA = c(1175, 1300), PINE = c(1275, 1350),
  PUBR = c(1000, 1200), WING = c(1100, 1200), WIPO = c(1125, 1225),
  SJ = c(1200, 1300), LSJ = c(1250, 1300), SPR = c(1250, 1300),
  PINER = c(1275, 1325), HESH = c(1275, 1450), KWAK = c(1275, 1450)
)

## Calculate date midpoints
mid <- vapply(X = dates, FUN = mean, FUN.VALUE = numeric(1))

## Calculate MCD
(mc_dates <- mcd(zuni[100:125, ], dates = mid))

## Get MCD in years CE
time(mc_dates, calendar = CE())

## Plot
plot(mc_dates)

## Bootstrap resampling
boot <- bootstrap(mc_dates, n = 30)
head(boot)

## Jackknife resampling
jack <- jackknife(mc_dates)
head(jack)

## Simulation
sim <- simulate(mc_dates, nsim = 30)
plot(sim, interval = "range", pch = 16)

Run the code above in your browser using DataLab