Bacon age model

Bacon(
  wdir,
  entity,
  cpus = 1,
  postbomb = 0,
  cc = 0,
  seed = NA,
  alt_depths = NULL,
  quiet = FALSE,
  acc = NULL,
  acc_step = 5,
  acc_lower = NULL,
  acc_upper = NULL,
  thick = NULL,
  thick_step = 5,
  thick_lower = NULL,
  thick_upper = NULL,
  dry_run = FALSE,
  restart = FALSE,
  max_scenarios = 100,
  ...
)

Bacon2(
  wdir,
  entity,
  cpus = 1,
  postbomb = 0,
  cc = 0,
  seed = NA,
  alt_depths = NULL,
  quiet = FALSE,
  acc = NULL,
  acc_step = 5,
  acc_lower = NULL,
  acc_upper = NULL,
  thick = NULL,
  thick_step = 5,
  thick_lower = NULL,
  thick_upper = NULL,
  dry_run = FALSE,
  restart = FALSE,
  max_scenarios = 100,
  ...
)

Arguments

wdir

Path where input files are stored.

entity

Name of the entity.

cpus

Number of CPUs to be used on the computation of the age models.

postbomb

Use a postbomb curve for negative (i.e. postbomb) 14C ages. 0 = none, 1 = NH1, 2 = NH2, 3 = NH3, 4 = SH1-2, 5 = SH3.

cc

Calibration curve for C-14 dates: cc = 1 for IntCal20 (northern hemisphere terrestrial), cc = 2 for Marine20 (marine), cc = 3 for SHCal20 (southern hemisphere terrestrial). For dates that are already on the cal BP scale use cc = 0.

seed

Set see to reproduce results. This seed is used for C++ executions, if it is not assigned then the seed is set by the system.

alt_depths

List of arrays with new depths.

quiet

Boolean to hide status messages.

acc

Numeric vector with the accumulation rates to use for the scenarios. If passed, then acc_step, acc_lower, and acc_upper will be ignored.

acc_step

Accumulation rate step. Used to create alternative scenarios.

acc_lower

Accumulation rate lower bound. Used to create alternative scenarios.

acc_upper

Accumulation rate upper bound. Used to create alternative scenarios.

thick

Numeric vector with the core segments' thickness to use for the scenarios. If passed, then thick_step, thick_lower, and thick_upper will be ignored.

thick_step

Core segments thickness step. Used to create alternative scenarios.

thick_lower

Core segments thickness lower bound. Used to create alternative scenarios.

thick_upper

Core segments thickness upper bound. Used to create alternative scenarios.

dry_run

Boolean flag to show (dry_run = TRUE) the scenarios that would be run with the current set of parameters, without actually running them.

restart

Boolean flag to indicate if the execution should be resume from a previous one.

max_scenarios

Numeric value with the maximum number of scenarios to execute.

...

Arguments passed on to rbacon::Bacon

prob

Confidence interval to report. This should lie between 0 and 1, default 0.95 (95 %).

d.min

Minimum depth of age-depth model (use this to extrapolate to depths higher than the top dated depth).

d.max

Maximum depth of age-depth model (use this to extrapolate to depths below the bottom dated depth).

add.bottom

Add a model section at the bottom of the core, in order to ensure the bottommost date is taken into account. Default add.bottom=TRUE. This is a new option and can cause age-models to differ from previous version. Please re-run the model if in doubt.

d.by

Depth intervals at which ages are calculated. Defaults to d.by=1.

depths

By default, Bacon will calculate the ages for the depths d.min to d.max in steps of d.by. Alternative depths can be provided as, e.g., depths=seq(0, 100, length=500) or as a file, e.g., depths=read.table("CoreDepths.txt". See also depths.file.

depth.unit

Units of the depths. Defaults to depth.unit="cm".

age.unit

Units of the ages. Defaults to age.unit="yr".

unit

Deprecated and replaced by depth.unit.

acc.mean

The accumulation rate prior consists of a gamma distribution with two parameters. Its mean is set by acc.mean (default acc.mean=20 yr/cm (or whatever age or depth units are chosen), which can be changed to, e.g., 5, 10 or 50 for different kinds of deposits). Multiple values can be given in case of hiatuses or boundaries, e.g., Bacon(hiatus.depths=23, acc.mean=c(5,20))

mem.strength

The prior for the memory (dependence of accumulation rate between neighbouring depths) is a beta distribution, which looks much like the gamma distribution. but its values are always between 0 (no assumed memory) and 1 (100% memory). Its default settings of mem.strength=10 (higher values result in more peaked shapes) allow for a large range of posterior memory values. Please note that the default memory prior has been updated from rbacon version 2.5.1 on, to repair a bug.

mem.mean

The prior for the memory is a beta distribution, which looks much like the gamma distribution but its values are always between 0 (no assumed memory) and 1 (100% memory). Its default settings of mem.mean=0.5 allow for a large range of posterior memory values. Please note that the default memory prior has been updated from rbacon version 2.5.1. on, to repair a bug.

boundary

The assumed depths of any boundary, which divides sections of different accumulation rate regimes (e.g., as indicated by major change in the stratigraphy). No hiatus is assumed between these sections, and memory is reset crossing the boundary. Different accumulation priors can be set for the sections above and below the boundary, e.g., acc.mean=c(5, 20). See also hiatus.depths, mem.mean, acc.mean and acc.shape. Setting many boundaries might not work, and having more than one boundary per model section (see 'thick') might not work either.

hiatus.max

The prior for the maximum length of the hiatus. Hiatus length is a uniform distribution, with equal probabilities between 0 and hiatus.max yr (or whatever other age.unit is chosen).

add

Add a value to the maximum hiatus length if a boundary is chosen. Defaults to 100 yr (or whatever other age unit is chosen). Can be adapted if Bacon complains that the parameters are out of support.

after

Sets a short section above and below hiatus.depths within which to calculate ages. For internal calculations - do not change.

cc1

For northern hemisphere terrestrial 14C dates (IntCal20).

cc2

For marine 14C dates (Marine20).

cc3

For southern hemisphere 14C dates (SHCal20).

cc4

Use an alternative curve (3 columns: cal BP, 14C age, error, separated by white spaces and saved as a plain-text file). See ccdir.

ccdir

Directory where the calibration curves for C14 dates cc are located. By default ccdir="". For example, use ccdir="." to choose current working directory, or ccdir="Curves/" to choose sub-folder Curves/. Note that all calibration curves should reside in the same directory. If you want to add a custom-built curve, put it in the directory where the default calibration curves are (probably list.files(paste0(.libPaths(), "/IntCal/extdata"))). Alternatively produce a new folder, and add your curve as well as the default calibration curves there (cc1, cc2 and cc3; e.g., write.table(ccurve(1), "./3Col_intcal20.14C", sep="\t").)

delta.R

Mean of core-wide age offsets (e.g., regional marine offsets).

delta.STD

Error of core-wide age offsets (e.g., regional marine offsets).

t.a

The dates are treated using the student's t distribution by default (normal=FALSE). The student's t-distribution has two parameters, t.a and t.b, set at 3 and 4 by default (see Christen and Perez, 2010). If you want to assign narrower error distributions (more closely resembling the normal distribution), set t.a and t.b at for example 33 and 34 respectively (e.g., for specific dates in your .csv file). For symmetry reasons, t.a must always be equal to t.b-1.

t.b

The dates are treated using the student's t distribution by default (normal=FALSE). The student's t-distribution has two parameters, t.a and t.b, set at 3 and 4 by default (see Christen and Perez, 2010). If you want to assign narrower error distributions (more closely resembling the normal distribution), set t.a and t.b at for example 33 and 34 respectively (e.g., for specific dates in your .csv file). For symmetry reasons, t.a must always be equal to t.b-1.

normal

By default, Bacon uses the student's t-distribution to treat the dates. Use normal=TRUE to use the normal/Gaussian distribution. This will generally give higher weight to the dates.

accept.suggestions

Automatically accept the suggested values. Use with care. Default accept.suggestions=FALSE. Also, if the length of the core would cause too few or too many sections with the default settings, Bacon will suggest an alternative section thickness thick. Accept these suggested alternative settings by typing "y" (or "yes please" if you prefer to be polite), or leave as is by typing "n" (or anything else, really). To get rid of these suggestions, use suggest=FALSE.

reswarn

Bacon will warn you if the number of sections lies outside the safe range (default between 10 and 200 sections; reswarn=c(10,200)). Too few sections could lead to an `elbowy' model while with too many sections the modelling process can get lost, resulting in age-models far away from the dated depths.

remember

Bacon will try to remember which settings you have applied to your cores (default remember=TRUE). If you run into inconsistencies or other problems, try running your core again with remember=FALSE, or, start cleanly by typing Bacon.cleanup().

run

In order to load an existing Bacon run instead of producing a new one, you can use run=FALSE.

defaults

Name of the file containing settings for the core. For internal use only - do not change.

sep

Separator between the fields of the plain text file containing the dating information. Default sep=",".

dec

Character for decimal points. Default to dec=".".

runname

Text to add to the corename for specific runs, e.g., runname="MyCore_Test1".

slump

Upper and lower depths of any sections of assumed abrupt accumulation, that require excising before age-modelling (and adding after age-modelling). Requires pairs of depths, e.g., slump=c(10,15,60,67) for slumps at 67-60 and 15-10 cm core depth.

remove

Whether or not to remove depths within slumps. Defaults to remove=FALSE.

BCAD

The calendar scale of graphs and age output-files is in cal BP (calendar or calibrated years before the present, where the present is AD 1950) by default, but can be changed to BC/AD using BCAD=TRUE.

burnin

Amount of initial, likely sub-optimal MCMC iterations that will be removed.

MinAge

Minimum age limit for Bacon runs, default at current year in cal BP. To set plot limits, use yr.min instead.

MaxAge

Maximum age limit for Bacon runs, default at 1,000,000 cal BP. To set plot limits, use yr.max instead.

MinYr

Deprecated - use MinAge instead.

MaxYr

Deprecated - use MaxAge instead.

cutoff

Avoid plotting very low probabilities of date distributions (default cutoff=0.001).

plot.pdf

Produce a pdf file of the age-depth plot. Defaults to plot.pdf=TRUE after a Bacon run.

dark

Darkness of the greyscale age-depth model. The darkest grey value is dark=1 by default. Lower values will result in lighter grey but values >1 are not allowed.

date.res

Date distributions are plotted using date.res=100 segments by default.

age.res

Resolution or amount of greyscale pixels to cover the age scale of the age-model plot. Default yr.res=200.

yr.res

Deprecated - use age.res instead

close.connections

Internal option to close connections after a run. Default close.connections=TRUE.

verbose

Provide feedback on what is happening (default verbose=TRUE).

Value

List with ggplot2 objects and summary statistics of all the scenarios computed.