Push a date to younger or older ages by adding (or subtracting) a gamma distribution (e.g. if a bone is assumed to have a lag or in-built age)
push.gamma(
y,
er,
mean,
shape,
add = TRUE,
n = 1e+06,
prob = 0.95,
cc = 1,
postbomb = FALSE,
deltaR = 0,
deltaSTD = 0,
thiscurve = NULL,
cc.dir = NULL,
is.F = FALSE,
normal = TRUE,
t.a = 3,
t.b = 4,
BCAD = FALSE,
cal.lim = c(),
calib.col = rgb(0, 0, 0, 0.25),
pushed.col = rgb(0, 0, 1, 0.4),
heights = 0.3,
inset = TRUE,
inset.col = "darkgreen",
inset.loc = c(0.6, 0.97, 0.6, 0.97),
inset.mar = c(3, 0.5, 0.5, 0.5),
inset.mgp = c(2, 1, 0)
)
The resulting calibrated distribution and its hpd ranges, together with a plot of the pushed date with the gamma distribution (and whether it is added or subtracted) as inset
The radiocarbon age
The error of the radiocarbon age
The mean of the gamma distribution
The shape of the gamma distribution. If setting this to shape=1, it becomes an exponential distribution.
The distribution can be added or subtracted. Adding results in ages being pushed to younger age distributions, and subtracting to older ones.
The amount of random values to sample (from both the calibrated distribution and the gamma distribution) to calculate the push. Defaults to n=1e6
.
The probability for the hpd ranges. Defaults to prob=0.95
.
Calibration curve to use. Defaults to IntCal20 (cc=1
).
Whether or not to use a postbomb curve. Required for negative radiocarbon ages. Defaults to postbomb=FALSE
.
Age offset (e.g. for marine samples).
Uncertainty of the age offset (1 standard deviation).
As an alternative to providing cc and/or postbomb, the data of a specific curve can be provided (3 columns: cal BP, C14 age, error).
Directory of the calibration curves. Defaults to where the package's files are stored (system.file), but can be set to, e.g., cc.dir="curves"
.
Use this if the provided date is in the F14C realm.
Use the normal distribution to calibrate dates (default TRUE). The alternative is to use the t model (Christen and Perez 2016).
Value a of the t distribution (defaults to 3).
Value b of the t distribution (defaults to 4).
Which calendar scale to use. Defaults to cal BP, BCAD=FALSE
.
Calendar axis limits. Calculated automatically by default.
Colour of the calibrated distribution (defaults to semi-transparent light grey).
Colour of the pushed distribution (defaults to semi-transparent blue).
Heights of the calibrated and 'pushed' distributions. Defaults to 0.3 of the device's height.
Whether or not to plot an inset graph showing the shape of the normal/gamma distribution.
Colour of the normal/gamma distribution.
Location of the inset graph.
Margins of the inset graph.
Margin lines for the inset graph.
n random values will be sampled from the calibrated distribution, and a similar amount will be sampled from the gamma distribution. The sampled values will then be added to or subtracted from each other to push the date to younger or older ages.
push.gamma(250, 25, 50, 2, add=FALSE) # subtract a gamma distribution
Run the code above in your browser using DataLab