gibbs_ad_use | R Documentation |
Using the results of gibbs_ad
, estimate a single density for the date of use of an artifact or artifact type. Multiple artifacts and types can be given, which will be pooled into a single type. For example, one can input several individual finds via their id number as comprising a type, or multiple (sub)types/classes as a single type, (e.g., "MGS V amphora", "MGS VI amphora", "MGS V/VI amphora" to construct one group).
gibbs_ad_use(
marginalized,
finds,
id = NULL,
type = NULL,
type_name = NULL,
max_samples = 10^5,
size = 10^3,
mcse_crit = 0.5
)
## S3 method for class 'marginals'
gibbs_ad_use(
marginalized,
finds,
id = NULL,
type = NULL,
type_name = NULL,
max_samples = 10^5,
size = 10^3,
mcse_crit = 0.5
)
marginalized |
A |
finds |
Either the |
id |
A vector of the |
type |
A vector of one or more types to estimate a use density for. Must contain a value if |
type_name |
A customized label for the type (e.g., if one is selecting via |
max_samples |
Maximum number of samples to run. Default is |
size |
The number of samples to take on each iteration of the main Gibbs sampler. Default is |
mcse_crit |
Criterion for the Monte Carlo standard error to stop the Gibbs sampler. Only the MCSE of the use date is used as a stopping rule. |
Depending on whether one is using id numbers or type(s), the id
or type
argument is used, which takes a vector of the entries' names. The gibbs_ad_use
function samples a use date between the production and depositional densities from the results of gibbs_ad
, and in turn pools those densities for the production and deposition of the stipulated ids/type; the resulting list
object does not express marginalized densities of production and deposition in light of the estimation of a use date.
See gibbs_ad
for information on consistent batch means and Monte Carlo standard error, which are used to determined convergence for the use date.
A list
of class use_marginals
of the density of a use date, conditional upon production and depositional dates.
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 = seq(37, 41, length = 100))
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, tpq = tpq_info, taq = taq_info)
# use dates by specifying ids
gibbs_ad_use(result, artifacts, id = c("find04", "find05"), max_samples = 2000, mcse_crit = 2)
# use dates by specifying types
gibbs_ad_use(result, artifacts, type = "type1", max_samples = 2000, mcse_crit = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.