gibbs_ad {eratosthenes} | R Documentation |
A Gibbs sampler for archaeological dating, to fit relative sequences to absolute, calendrical dates. Elements can be associated with termini post quem (t.p.q.) and termini ante quem (t.a.q.), which are treated as a given probability density function f(t)
. This function may take any form, a single date (i.e., with a probability of 1), a continuous uniform distribution (any time between two dates), or a bespoke density (as with calibrated radicarbon dates). Inputs of this function take samples drawn from their respective density functions.
gibbs_ad(
sequences,
finds = NULL,
samples = 10^5,
tpq = NULL,
taq = NULL,
alpha = -5000,
omega = 1950,
trim = TRUE,
rule = "naive"
)
## S3 method for class 'list'
gibbs_ad(
sequences,
finds = NULL,
samples = 10^5,
tpq = NULL,
taq = NULL,
alpha = -5000,
omega = 1950,
trim = TRUE,
rule = "naive"
)
sequences |
A |
finds |
Optional. A |
samples |
Number of samples. Default is |
tpq |
A
|
taq |
A
|
alpha |
An initial t.p.q. to limit any elements which may occur before the first provided t.p.q. Default is |
omega |
A final t.a.q. to limit any elements which may occur after the after the last provided t.a.q. Default is |
trim |
A logical value to determine whether elements that occur before the first t.p.q. and after the last t.a.q. should be ommitted from the results (i.e., to "trim" elements at the ends of the sequence, whose marginal densities depend on the selection of |
rule |
The rule for computing an estimated date of production of a find-type, either |
A list
object of class marginals
which contains the following:
deposition
A list
of samples from the marginal density of each context's depositional date.
externals
A list
of samples of the marginal density of each constrant (t.p.q. and t.a.q.]), as conditioned upon the occurrence of other depositional
production
If a finds
object has been input, samples of the marginal density of the production date of finds types will be included in the output.
x <- c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J")
y <- c("B", "D", "G", "H", "K")
z <- c("F", "K", "L", "M")
contexts <- list(x, y, z)
f1 <- list(id = "find01", assoc = "D", type = c("type1", "form1"))
f2 <- list(id = "find02", assoc = "E", type = c("type1", "form2"))
f3 <- list(id = "find03", assoc = "G", type = c("type1", "form1"))
f4 <- list(id = "find04", assoc = "H", type = c("type2", "form1"))
f5 <- list(id = "find05", assoc = "I", type = "type2")
f6 <- list(id = "find06", assoc = "H", type = NULL)
artifacts <- list(f1, f2, f3, f4, f5, f6)
# external constraints
coin1 <- list(id = "coin1", assoc = "B", type = NULL, samples = runif(100,-320,-300))
coin2 <- list(id = "coin2", assoc = "G", type = NULL, samples = runif(100,37,41))
destr <- list(id = "destr", assoc = "J", type = NULL, samples = 79)
tpq_info <- list(coin1, coin2)
taq_info <- list(destr)
result <- gibbs_ad(contexts, finds = artifacts, samples = 10^4, tpq = tpq_info, taq = taq_info)