| ckde {rcarbon} | R Documentation |
Composite Kernel Density Estimates of Radiocarbon Dates
Description
Computes a Composite Kernel Density Estimate (CKDE) from multiple sets of randomly sampled calendar dates.
Usage
ckde(x, timeRange, bw, normalised = FALSE)
Arguments
x |
A |
timeRange |
A vector of length 2 indicating the start and end date of the analysis in cal BP. |
bw |
Kernel bandwidth to be used. |
normalised |
A logical variable indicating whether the contribution of individual dates should be equal (TRUE), or weighted based on the area under the curve of non-normalised calibration (FALSE). Default is TRUE. |
Details
The function computes Kernel Density Estimates using randomly sampled calendar dates contained in a simdates class object (generated using the sampledates() function). The output contains nsim KDEs, where nsim is the argument used in simulate.dates(). The resulting object can be plotted to visualise a CKDE (cf Brown 2017), and if boot was set to TRUE in sampleDates its bootstrapped variant (cf McLaughlin 2018 for a similar analysis). The shape of the CKDE is comparable to an SPD generated from non-normalised dates when the argument normalised is set to FALSE.
Value
An object of class ckdeSPD with the following elements
timeRangeThetimeRangesetting used.res.matrixA matrix containing the KDE values with rows representing calendar dates.
References
Brown, W. A. 2017. The past and future of growth rate estimation in demographic temporal frequency analysis: Biodemographic interpretability and the ascendance of dynamic growth models. Journal of Archaeological Science, 80: 96–108. DOI: https://doi.org/10.1016/j.jas.2017.02.003
McLaughlin, T. R. 2018. On Applications of Space–Time Modelling with Open-Source 14C Age Calibration. Journal of Archaeological Method and Theory. DOI https://doi.org/10.1007/s10816-018-9381-3
See Also
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)
s = sampleDates(x,bins=bins,nsim=100,boot=FALSE)
ckdeNorm = ckde(s,timeRange=c(16000,9000),bw=100,normalised=TRUE)
plot(ckdeNorm,type='multiline',calendar='BCAD')
## End(Not run)