ckde | R Documentation |
Computes a Composite Kernel Density Estimate (CKDE) from multiple sets of randomly sampled calendar dates.
ckde(x, timeRange, bw, normalised = FALSE)
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. |
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.
An object of class ckdeSPD
with the following elements
timeRange
The timeRange
setting used.
res.matrix
A matrix containing the KDE values with rows representing calendar dates.
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
sampleDates
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.