stackspd function

Stacked Summed Probability Distribution

Stacked Summed Probability Distribution

Generates and combines multiple SPDs based on a user defined grouping.

stackspd( x, timeRange, bins = NA, group = NULL, datenormalised = FALSE, runm = NA, verbose = TRUE, edgeSize = 500 )

Arguments

  • x: A CalDates class object containing the calibrated radiocarbon dates.
  • timeRange: A vector of length 2 indicating the start and end date of the analysis in cal BP.
  • bins: A vector containing the bin names associated with each radiocarbon date. If set to NA, binning is not carried out.
  • group: A character or factor vector containing the grouping variable.
  • datenormalised: Controls for calibrated dates with probability mass outside the timerange of analysis. If set to TRUE the total probability mass within the time-span of analysis is normalised to sum to unity. Should be set to FALSE when the parameter normalised in calibrate is set to FALSE. Default is FALSE.
  • runm: A number indicating the window size of the moving average to smooth the SPD. If set to NA no moving average is applied. Default is NA
  • verbose: A logical variable indicating whether extra information on progress should be reported. Default is TRUE.
  • edgeSize: Controls edge effect by expanding the fitted model beyond the range defined by timeRange.

Returns

An object of class stackCalSPD

Examples

## Not run: data(emedyd) x = calibrate(x=emedyd$CRA, errors=emedyd$Error,normalised=FALSE) bins = binPrep(sites=emedyd$SiteName, ages=emedyd$CRA,h=50) res = stackspd(x=x,timeRange=c(16000,8000),bins=bins,group=emedyd$Region) ## End(Not run)
  • Maintainer: Enrico Crema
  • License: GPL (>= 2)
  • Last published: 2023-08-24