A simple Bayesian approach for a set of Gaussian ages in a sequence.
Find the code in my GitHub repository.
How it works
- Install MATLAB or Octave on your computer.
- Download the files
BFG.mto the same folder as your
Download ZIPand extract all files).
- Run CASC.m in MATLAB or Octave to compute a sequence of ages for samples listed in
Copy your data in a comma-separated file called
data.csv with one header line:
Sample name , age , uncertainty , unit name , sequential order
data.csv can be created in Excel and save as .csv. Make sure to use
. as decimal separator and
, as the delimiter.
Samples from the same unit have the same sequential order. In case of a gap in the sequential order (e.g. 1, 2, 4, 5), sequential ages will be calculated also for units with no data.
Avoid spaces and symbols in sample and unit names. For example, use “Moraine-1” instead of “Moraine 1”.
Under the hood
Age probabilities for each unit (e.g. each moraine) are calculated as:
P(t|T+>T>T-) ~ P(T|t) * P(t|t<T+) * P(t|t>T-)
T- are the measured data corresponding to the older,
contemporary, and younger units.
P(t|t>T-) are the product of
the old-to-young and the young-to-old cumulative sums of older and younger
age distributions from other units, scaled between 0 and 1.
All distributions are scaled to fit a total probability of 1 for each
Gaussians are fitted to resulting distributions to produce symmetric ages
for the units. (BGF, see https://github.com/angelrodes/CEAA)
Two graphs are generated:
- A scatter + error bar graph with the data (black) and squence ages (blue)
- A plot showing the camelplots corresponding to the original data (in blue) and the sequential ages (in red)