hamstr_bacon | R Documentation |
Wraps the Bacon function from rbacon so that it can be used in a more typical "R" way. Returns age-depth models in a format to match hamstr output. Most Bacon functionality is accessible, for example hiatuses and boundaries, different calibration curves, postbomb curves. "accept.suggestions" defaults to TRUE so that the Bacon's accumulation rate prior suggestion is used by default, however, the section thickness parameter "thick" is by default allowed to be changed.
hamstr_bacon(
id = "default",
depth,
obs_age,
obs_err,
thick = 5,
d.min = NA,
d.max = NA,
d.by = NULL,
seed = NA,
acc.shape = 1.5,
acc.mean = 20,
mem.strength = 10,
mem.mean = 0.5,
boundary = NA,
hiatus.depths = NA,
hiatus.max = 10000,
add = c(),
cc = 1,
cc1 = "IntCal20",
cc2 = "Marine20",
cc3 = "SHCal20",
cc4 = "ConstCal",
ccdir = "",
postbomb = 0,
delta.R = 0,
delta.STD = 0,
t.a = 3,
t.b = 4,
normal = FALSE,
suggest = TRUE,
accept.suggestions = TRUE,
reswarn = c(10, 200),
ask = FALSE,
slump = c(),
remove = FALSE,
ssize = 2000,
th0 = c(),
burnin = min(500, ssize),
youngest.age = c(),
oldest.age = c(),
plot.pdf = FALSE,
close.connections = FALSE,
verbose = FALSE,
suppress.plots = TRUE,
bacon.change.thick = FALSE
)
depth |
A vector of depths |
obs_age |
A vector of observed ages |
obs_err |
A vector of errors on the observed ages |
thick |
Bacon will divide the core into sections of equal thickness specified by thick (default |
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). |
d.by |
Depth intervals at which ages are calculated. Defaults to |
seed |
Seed used for C++ executions. If it is not assigned ( |
acc.shape |
The prior for the accumulation rate consists of a gamma distribution with two parameters.
Its shape is set by acc.shape (default |
acc.mean |
The accumulation rate prior consists of a gamma distribution with two parameters. Its mean is set by acc.mean (default |
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.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 |
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., |
hiatus.depths |
The assumed depths for any hiatus should be provided as, e.g.,
|
hiatus.max |
The prior for the maximum length of the hiatus. Hiatus length is a uniform distribution, with equal probabilities between 0 and |
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. |
cc |
Calibration curve for C-14 dates: |
cc1 |
For northern hemisphere terrestrial 14C dates (IntCal20). |
cc2 |
For marine 14C dates (Marine20). |
cc3 |
For southern hemisphere 14C dates (SHCal20). |
cc4 |
Provide the name of an alternative curve (3 columns: cal BP, 14C age, error, separated by white spaces and saved as a plain-text file). It is important here to first produce a tailor-made folder for your and the default calibration curves to live in. See |
postbomb |
Use a postbomb curve for negative (i.e. postbomb) 14C ages. |
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 t distribution (Christen and Perez 2009) by default ( |
t.b |
The dates are treated using t distribution by default ( |
normal |
By default, Bacon uses the t-distribution to treat the dates. Use |
suggest |
If initial analysis of the data indicates abnormally slow or fast accumulation rates, Bacon will suggest to change the prior. |
accept.suggestions |
Automatically accept the suggested values. Use with care. Default |
reswarn |
Bacon will warn you if the number of sections lies outside the safe range (default between 10 and 200 sections;
|
ask |
By default Bacon will ask you to confirm that you want to run the core with the provided settings. Disable this using |
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., |
remove |
Whether or not to remove depths within slumps. Defaults to |
ssize |
The amount of iterations to store at the end of the MCMC run. Default 4000; decrease for faster (but less reliable) runs or increase for cores where the MCMC mixing (panel at upper-left corner of age-model graph) appears problematic. |
th0 |
Starting years for the MCMC iterations. These are randomly chosen by default. |
burnin |
Amount of initial, likely sub-optimal MCMC iterations that will be removed. |
youngest.age |
Minimum age limit for Bacon runs, default at current year in cal BP. To set plot limits, use |
oldest.age |
Maximum age limit for Bacon runs, default at 1,000,000 cal BP. To set plot limits, use |
plot.pdf |
Produce a pdf file of the age-depth plot. Defaults to |
close.connections |
Internal option to close connections after a run. Default |
verbose |
Provide feedback on what is happening (default |
bacon.change.thick |
Optionally allow Bacon to change the default or user supplied thick parameter |
## Not run:
hb1 <- hamstr_bacon(id = "sdf",
depth = MSB2K$depth,
obs_age = MSB2K$age,
obs_err = MSB2K$error
)
plot(hb1)
predict(hb1)
summary(hb1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.