predict_d18oc {bayfoxr}  R Documentation 
Predict d18O of foram calcite given seawater temperature and seawater d18O.
predict_d18oc(seatemp, d18osw, foram = NULL, seasonal_seatemp = FALSE,
drawsfun = get_draws)
seatemp 
Numeric or vector of observed seasurface temperatures (°C). 
d18osw 
Numeric or vector of observed seawater d18O (‰ VSMOW). 
foram 
Optional. String or 
seasonal_seatemp 
Optional boolean indicating whether to use the seasonal
seasurface temperature calibrations. Default is 
drawsfun 
Optional function used to get get model parameter draws. Must
take arguments for "foram" and "seasonal_seatemp" and return a list with
members "alpha", "beta", "tau". This is for debugging and testing. See

Four calibration models are available: an "annual pooled" model, a
"seasonal pooled" model, an "annual hierarchical" model, and a
"seasonal hierarchical" model. This function uses magic to determine which
"pooled annual" model is used. Which is the simplest case with potential use
for Deep Time reconstructions of nonexant foram species. Giving a valid string
for foram
will use a hierarchical model, which has foramspecific
variability in calibration model parameters. Passing TRUE
for
seasonal_seatemp
will use a model trained on season seasurface
temperatures. See reference paper for further details.
A prediction
instance for inferred foraminiferal calcite
d18O (‰ VPDB).
# Infer d18Oc for a G. bulloides core top sample using annual hierarchical model.
# The true, d18Oc for this sample is 2.16 (‰ VPDB).
delo_ann < predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. bulloides")
head(quantile(delo_ann, probs=c(0.159, 0.5, 0.841))) # ± 1 standard deviation
# Now using seasonal hierarchical model:
delo_sea < predict_d18oc(seatemp=28.6, d18osw=0.48, foram="G. bulloides",
seasonal_seatemp = TRUE)
head(quantile(delo_sea, probs=c(0.159, 0.5, 0.841))) # ± 1 standard deviation