The presentation slides of this session can be downloaded from these links: .odp or .pptx.
The streamed sessions are here (in two parts - before and after cat intrusion):
session 1 part 1
video on youtube
chats
transcript
session 1 part 2
video on youtube
chats
transcript
The .Rmd script for session 1 is here: session 1.
This page contains the R code used in the first session of the GSA Short Course on age-modeling.
To get to grips with radiocarbon’s half-life of 5730 years, first let’s set up a variable called yr
that contains 10 half-lives. Then calculate how much radiocarbon is left at each of the entries (in percent, so we multiply this by 100):
seq(0, by=5730, length=10)
yr <- .5 ^ (0:9)
halflives <-cbind(yr, 100*halflives)
## yr
## [1,] 0 100.0000000
## [2,] 5730 50.0000000
## [3,] 11460 25.0000000
## [4,] 17190 12.5000000
## [5,] 22920 6.2500000
## [6,] 28650 3.1250000
## [7,] 34380 1.5625000
## [8,] 40110 0.7812500
## [9,] 45840 0.3906250
## [10,] 51570 0.1953125
Type (or paste) the above commands in R’s terminal window and press the Enter
key after each command. The wee <-
arrow means assign, so by typing yr <- seq(0, by=5730, length=10)
we define a new variable called yr
, and fill it with a sequence (seq
) that starts with the value 0
, increases by 5730
each time, and has length=10
values.
To re-run previous commands in your R terminal, press the up arrow. You can also type the first few letters of a command and then press the tab key to fill in the rest (or suggest what could be filled in next if there are multiple options).
Sometimes when R plots things, the plot window becomes active and you will have to click on the terminal again to enter more data or commands.
To plot the data behind the latest IntCal calibration curve, IntCal20, first we have to load the IntCal package (see the previous page if you haven’t installed it yet):
require(IntCal)
Now we can plot the data, e.g. from 0 to 1000 cal BP:
intcal.data(0, 1000)
The legend shows the origins of the datasets. All start with a t, which means that these are tree-ring datasets.
Diving further back in time, e.g. between 30 and 40 thousand years ago, there are no more continuous tree-ring series and here IntCal20 relies on other independently-dated datasets and their radiocarbon ages:
intcal.data(30e3, 40e3)
tTurney is a wiggle-match dated Kauri tree, lSuigetsu is from a Japanese varved lake, and mCariaco is from a marine basin off Venezuela.
To plot just the curve without the data:
draw.ccurve()
The following graph is a plot of the IntCal20 calibration curve (in blue) and the NH1 postbomb curve (green) (not that they are on separate vertical axes):
draw.ccurve(1850, 2020, BCAD=T, cc2="nh1", add.yaxis=T)
To check the values within the calibration curve, store the curve in a new variable and have a look at it:
ccurve()
cc <-head(cc)
## V1 V2 V3
## 1 0 199 11
## 2 1 197 11
## 3 2 195 11
## 4 3 193 11
## 5 4 190 11
## 6 5 188 11
Before we go and calibrate a date, first we have to look at probability distributions. For example, if we have a measurement of 130 +- 20
, what are its possible values? Is, say, 125 a likely value given this measurement? We can calculate this, assuming a normal distribution (dnorm
):
dnorm(125, 130, 20)
## [1] 0.01933341
Not a very likely value perhaps. But what about 130 as a value?
dnorm(130, 130, 20)
## [1] 0.01994711
Let’s calculate, list and plot a larger range of values and their probabilities:
0:250
x <- dnorm(x, 130, 20)
probs <-head(cbind(x, probs))
## x probs
## [1,] 0 1.334778e-11
## [2,] 1 1.845066e-11
## [3,] 2 2.544070e-11
## [4,] 3 3.499133e-11
## [5,] 4 4.800717e-11
## [6,] 5 6.570009e-11
sum(probs)
## [1] 1
plot(x, probs, type="l")
So, each value has a corresponding probability, given the measurement and its error.
When you calibrate a radiocarbon date, you are comparing the obtained 14C age with the calibration curve (in this case IntCal20). For each calendar year, the IntCal20 14C age of that calendar year is compared with the 14C age of the to-be-calibrated sample. Imagine for now that you have a radiocarbon date of 130 +- 20
. To calibrate it, for each calendar year of the calibration curve, check its probability given the IntCal20 radiocarbon year belonging to that calendar year. For example, for the most recent few years of IntCal20:
ccurve()
cc <- cc[,1]
yr.intcal <- cc[,2]
c14.intcal <- dnorm(c14.intcal, 130, 20)
probs <-plot(yr.intcal, probs, xlim=c(0, 300), type="l")
In fact, we also need to take into account the uncertainty of the calibration curve itself, by summing the squared errors:
ccurve()
cc <- cc[,1]
yr.intcal <- cc[,2]
c14.intcal <- cc[,3]
c14.errors <- dnorm(c14.intcal, 130, sqrt(20^2 + c14.errors^2))
probs <-plot(yr.intcal, probs, xlim=c(0, 300), type="l")
The above can be done much more quickly using IntCal’s calibrate
function:
calibrate(130,20)
For help and options, place a question mark before the function, e.g., ?calibrate
.