This is the main age-depth modelling function of the rbacon package.
Bacon(core = "MSB2K", thick = 5, coredir = "", prob = 0.95,
d.min = NA, d.max = NA, d.by = 1, depths.file = FALSE, depths = c(),
unit = "cm", acc.shape = 1.5, acc.mean = 20, mem.strength = 4,
mem.mean = 0.7, boundary = NA, hiatus.depths = NA, hiatus.max = 10000,
add = 0, after = 1e-04, cc = 1, cc1 = "IntCal13", cc2 = "Marine13",
cc3 = "SHCal13", cc4 = "ConstCal", ccdir = "", postbomb = 0,
delta.R = 0, delta.STD = 0, t.a = 3, t.b = 4, normal = FALSE,
suggest = TRUE, reswarn = c(10, 200), remember = TRUE, ask = TRUE,
run = TRUE, defaults = "default_settings.txt", sep = ",", dec = ".",
runname = "", slump = c(), BCAD = FALSE, ssize = 2000, th0 = c(),
burnin = min(200, ssize), MinYr = c(), MaxYr = c(), cutoff = 0.001,
plot.pdf = TRUE, dark = 1, date.res = 100, yr.res = 200, ...)
Name of the core, given using quotes. Defaults to one of the cores provided with rbacon, core="MSB2K"
.
An alternative core provided with this package is RLGH3 (Jones et al., 1989).
To run your own core, produce a .csv file with the dates as outlined in the manual, add a folder with the core's name to the default directory for cores (see coredir
), and save the .csv file there. For example, the file's location and name could be Bacon_runs/MyCore/MyCore.csv
. Then run Bacon as follows: Bacon("MyCore")
Bacon will divide the core into sections of equal thickness specified by thick (default thick=5
).
Folder where the core's files core
are and/or will be located. This will be a folder with the core's name, within either the folder coredir='Bacon_runs/'
, or the folder Cores/ if it already exists within R's working directory, or a custom-built folder. For example, use coredir="."
to place the core's folder within the current working directory, or coredir="F:"
if you want to put the core's folder and files on a USB drive loaded under F:.
Thinner (and thus more) sections will result in smoother age-models, but too many sections can cause 'run-away' models.
Confidence interval to report. This should lie between 0 and 1, default 0.95 (95 %).
Minimum depth of age-depth model (use this to extrapolate to depths higher than the top dated depth).
Maximum depth of age-depth model (use this to extrapolate to depths below the bottom dated depth).
Depth intervals at which ages are calculated. Defaults to d.by=1
.
By default, Bacon will calculate the ages for the depths d.min
to d.max
in steps of d.by
.
If depths.file=TRUE
, Bacon will read a file containing the depths for which you require ages.
This file, containing the depths in a single column without a header, should be stored within coredir
,
and its name should start with the core's name and end with '_depths.txt'. Then specify depths.file=TRUE
(default FALSE
). See also 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
.
Units of the depths. Note that the default prior for accumulation rate assumes the default unit="cm"
.
The prior for the accumulation rate consists of a gamma distribution with two parameters.
Its shape is set by acc.shape (default acc.shape=1.5
; higher values result in more peaked shapes).
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,
which can be changed to, e.g., 5, 10 or 50 for different kinds of deposits).
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=4
(higher values result in more peaked shapes) allow for a large range of posterior memory values.
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.7
allow for a large range of posterior memory values.
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
.
The assumed depths for any hiatus should be provided as, e.g.,
hiatus.depths=20
for one at 20cm depth, and hiatus.depths=c(20,40)
for two hiatuses at 20 and 40 cm depth.
The prior for the maximum length of the hiatus. Hiatus length is a uniform distribution, with equal probabilities between 0 and hiatus.max
yr.
Add a value to the maximum hiatus length if a boundary is chosen. Defaults to add=0
. Can be used if Bacon complains that the parameters are out of support.
Sets a short section above and below hiatus.depths within which to calculate ages. For internal calculations - do not change.
Calibration curve for C-14 dates: cc=1
for IntCal13 (northern hemisphere terrestrial), cc=2
for Marine13 (marine),
cc=3
for SHCal13 (southern hemisphere terrestrial). For dates that are already on the cal BP scale use cc=0
.
For northern hemisphere terrestrial 14C dates (IntCal13).
For marine 14C dates (Marine13).
For southern hemisphere 14C dates (SHCal13).
Use an alternative curve (3 columns: cal BP, 14C age, error, separated by white spaces and saved as a plain-text file).
Directory where the calibration curves for C14 dates cc
are located. By default ccdir=""
since they are loaded into R's memory.
Use ccdir="."
to choose current working directory. Use ccdir="Curves/"
to choose sub-folder Curves/
.
Use a postbomb curve for negative (i.e. postbomb) 14C ages. 0 = none, 1 = NH1, 2 = NH2, 3 = NH3, 4 = SH1-2, 5 = SH3
Mean of core-wide age offsets (e.g., regional marine offsets).
Error of core-wide age offsets (e.g., regional marine offsets).
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.
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.
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.
If initial analysis of the data indicates abnormally slow or fast accumulation rates, Bacon will suggest to change the prior.
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
.
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.
Bacon will try to remember which settings you've 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()
.
By default Bacon will ask you to confirm that you want to run the core with the provided settings. Disable this using ask=FALSE
(e.g., for batch runs).
In order to load an existing Bacon run instead of producing a new one, you can use run=FALSE
.
Name of the file containing settings for the core. For internal use only - do not change.
Separator between the fields of the plain text file containing the dating information. Default sep=","
.
Character for decimal points. Default to dec="."
.
Text to add to the corename for specific runs, e.g., runname="MyCore_Test1"
.
(not implemented yet).
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
.
The approximate amount of iterations to store at the end of the MCMC run. Default 2000; 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.
Starting years for the MCMC iterations.
Amount of initial, likely sub-optimal MCMC iterations that will be removed.
Minimum age limit for Bacon runs, default at -1000 cal BP. To set plot limits, use yr.min
instead.
Maximum age limit for Bacon runs, default at 1,000,000 cal BP. To set plot limits, use yr.max
instead.
Avoid plotting very low probabilities of date distributions (default cutoff=0.001
).
Produce a pdf file of the age-depth plot. Defaults to plot.pdf=TRUE
after a Bacon run.
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 distributions are plotted using date.res=100
segments by default.
Resolution or amount of greyscale pixels to cover the age scale of the age-model plot. Default yr.res=200
.
options for the age-depth graph. See agedepth and calib.plot
An age-depth model graph, its age estimates, and a summary.
Bacon is an approach to age-depth modelling that uses Bayesian statistics in order to reconstruct Bayesian accumulation histories for deposits, through combining radiocarbon and other dates with prior information (Blaauw and Christen, 2011).
Bacon divides a core into many thin vertical sections (by default of thick=5
cm thickness),
and through millions of Markov Chain Monte Carlo (MCMC) iterations estimates
the accumulation rate (in years/cm; so more correctly, sedimentation times) for each of these sections.
Combined with an estimated starting date for the first section, these accumulation rates then form the age-depth model.
The accumulation rates are constrained by prior information on the accumulation rate (acc.mean, acc.shape)
and its
variability between neighbouring depths, or 'memory' (mem.mean, mem.strength
). Hiatuses can be introduced as well, also constrained by prior information (hiatus.max
).
Although Bacon works with any kind of absolute dates (e.g., OSL, tephra or other dates on a calendar scale),
it is often used to age-model 14C-dated sequences. Radiocarbon dates should be calibrated using either IntCal13
(for terrestrial northern hemisphere material; Reimer et al., 2013), Marine13 (for marine dates; Reimer et al., 2013),
SHCal13 (for southern hemisphere dates; Hogg et al., 2013) or any other calibration curve (see below), while modern 14C
dates are calibrated using one of the post-bomb calibration curves (NH1, NH2 or NH3 for the northern hemisphere,
SH1-2 or SH3 for the southern hemisphere; Hua et al., 2013). See http://calib.org/CALIBomb if you are unsure which
postbomb curve you need. If Bacon finds postbomb dates (negative 14C ages) and you haven't specified a postbomb curve,
you will be prompted. Provide postbomb curves as, e.g., postbomb=1
for the NH1 postbomb curve (2 for NH2, 3 for NH3, 4 for SH1-2, 5 for SH3).
For calendar dates, i.e. dates that are already on the calendar scale and thus should not be calibrated, setcc=0
.
Blaauw, M. and Christen, J.A., Flexible paleoclimate age-depth models using an autoregressive gamma process. Bayesian Anal. 6 (2011), no. 3, 457--474. https://projecteuclid.org/download/pdf_1/euclid.ba/1339616472
Christen, J.A., Perez E., S., 2010. A new robust statistical model for radiocarbon data. Radiocarbon 51, 1047-1059.
Reimer, P.J., Bard, E., Bayliss, A., Beck, J.W., Blackwell, P.G., Bronk Ramsey, C., Buck, C.E., Edwards, R.L., Friedrich, M., Grootes, P.M., Guilderson, T.P., Haflidason, H., Hajdas, I., Hatte, C., Heaton, T.J., Hoffmann, D.L., Hogg, A.G., Hughen, K.A., Kaiser, K.F., Kromer, B., Manning, S.W., Niu, M., Reimer, R.W., Richards, D.A., Scott, M.E., Southon, J.R., Turney, C.S.M., van der Plicht, J., 2013. IntCal13 and Marine13 radiocarbon age calibration curves 0-50,000 yr cal BP. Radiocarbon 55(4), 1869-1887
Hogg, A.G., Hua, Q., Blackwell, P.G., Buck, C.E., Guilderson, T.P., Heaton, T.J., Niu, M., Palmer, J., Reimer, P.J., Reimer, R., Turney, C.S.M., Zimmerman, S.R.H., 2013. ShCal13 Southern Hemisphere calibration, 0-50,000 cal yr BP. Radiocarbon 55(4), doi:10.2458/azu_js_rc.55.16783.
Hua, Q., Barbetti, M., Rakowski, A.Z., 2013. Atmospheric radiocarbon for the period 1950-2010. Radiocarbon 55(4), doi:10.2458/azu_js_rc.v55i2.16177.
Jones, V.J., Stevenson, A.C., Battarbee, R.W., 1989. Acidification of lakes in Galloway, south west Scotland - a diatom and pollen study of the post-glacial history of the Round Loch of Glenhead. Journal of Ecology 77: 1-23.
# NOT RUN {
Bacon(ask=FALSE, coredir=tempfile())
Bacon(cc=2, delta.R=80, delta.STD=40, coredir=tempfile())
# }
Run the code above in your browser using DataLab