Skip to contents

Bayesian Models for Age Estimation with Priors from Model_DC14 Dataset

Usage

Compute_AgeS_DC14(
  DATA,
  Nb_sample,
  SampleNames,
  encoding,
  ThetaMatrix = c(),
  prior = "Unconstrained",
  model = NULL,
  StratiConstraints = c(),
  PriorAge = rep(c(1, 60), Nb_sample),
  SavePdf = FALSE,
  OutputFileName = c("MCMCplot", "HPD_Cal14CCurve", "summary"),
  OutputFilePath = c(""),
  SaveEstimates = FALSE,
  OutputTableName = c("DATA"),
  OutputTablePath = c(""),
  Model_C14 = c("full"),
  CalibrationCurve = c("IntCal20"),
  MCMC_plots = F,
  Iter = 10000,
  burnin = 4000,
  adapt = 1000,
  t = 5,
  n.chains = 3,
  jags_method = "rjparallel",
  autorun = FALSE,
  quiet = FALSE,
  roundingOfValue = 3,
  ...
)

Arguments

Nb_sample

integer number of samples

SampleNames

character character vector with sample names

encoding

vector encoder, 1 if OSL and 0 if C14

ThetaMatrix

matrix or character input of systematic and individual errors.

prior

character : Character string specifying the name of one of the models available in the Model_DC14 dataset. Use extract_Jags_model() to see all available options

model

character (optional) custom Jags model

StratiConstraints

matrix or character The stratigraphic relation between samples

PriorAge

vector (with default): lower and upper bounds for age parameter of each sample (in ka)

SavePdf

logical (with default): if TRUE save graphs in pdf file named OutputFileName in folder OutputFilePath.

OutputFileName

OutputFileName character (with default): name of the pdf file that will be generated by the function if SavePdf = TRUE; length(OutputFileName)=2, see PLOT OUTPUT in Value section for more informations.

OutputFilePath

character (with default): path to the pdf file that will be generated by the function if SavePdf=TRUE. If it is not equal to "", it must be terminated by "/".

SaveEstimates

logical (with default): if TRUE save Bayes' estimates, credible interval at level 68% and 95%, the result of the Gelman en Rubin test of convergence and the Time Series SE, in a csv table named OutputFileName in folder OutputFilePath.

OutputTableName

character (with default): name of the table that will be generated by the function if SaveEstimates = TRUE.

OutputTablePath

character (with default): path to the table that will be generated by the function if SaveEstimates = TRUE.

Model_C14

character (with default): always "full", error on estimate calibration curve is taken account, for C-14 samples

CalibrationCurve

character (with default): calibration curve chosen, for C-14 samples.

MCMC_plots

logical (with default): enable/disable MCMC and ACF plots.

Iter

(with default): the number of iterations to run which will be used to assess convergence and ages (see runjags::run.jags).

burnin

integer (with default): the number of iterations used to "home in" on the stationary posterior distribution. These are not used for assessing convergence (see runjags::run.jags).

adapt

integer (with default): the number of iterations used in the adaptive phase of the simulation (see runjags::run.jags).

t

integer (with default): 1 every t iterations of the MCMC is considered for sampling the posterior distribution. (for more information see runjags::run.jags).

n.chains

integer (with default): number of independent chains for the model (for more information see runjags::run.jags).

jags_method

character (with default): select which method to use in order to call JAGS. jags_methods "rjparallel" (the default) and "rjags" have been tested. (for more information about these possibilities and others, see runjags::run.jags)

autorun

logical (with default): choose to automate JAGS processing. JAGS model will be automatically extended until convergence is reached (for more information see runjags::autorun.jags).

quiet

logical (with default): enables/disables rjags messages

roundingOfValue

integer (with default): Integer indicating the number of decimal places to be used

...
**(required)**

list of objects :

  • Vector of Equivalent doses and C14 Calibrated Ages in the right order according to stratigraphy

  • dose rates : ddot

  • standard error for D : sD

  • Error of the C14 Calibrated age : SigmaC14Cal

Value

NUMERICAL OUTPUT

A list of type BayLum.list containing the following objects:

  • Ages : dataframe containing the Credible interval at 95% and 68%, the bayes mean estimator, the bayes standard deviation estimator and sample names.

  • Sampling: that corresponds to a sample of the posterior distributions of the age (in ka);

  • prior: category of prior used. prior == unconstrained if no stratigraphic constraints;

  • PriorAge: stating the priors used for the age parameter (in ka);

  • StratiConstraints: stating the stratigraphic relations between samples considered in the model;

  • CovarianceMatrix: stating the covariance matrix of error used in the model, highlighting common errors between samples or not;

  • model: returns the model that was used for the Bayesian modelling as a character;

  • diagnostics_plots: List of MCMC and ACF plots for the diagnostics of convergence – check attributes for Gelman CV;

  • Summary: Summary Table of the posterior's MCMC;

Examples