Title: | Bayesian Analysis of Clumped Isotope Datasets |
---|---|
Description: | Simulating synthetic clumped isotope dataset, fitting linear regression models under Bayesian and non-Bayesian frameworks, and generating temperature reconstructions for the same two approaches. |
Authors: | Cristian Roman Palacios [aut, cre]
|
Maintainer: | Cristian Roman Palacios <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.1.1 |
Built: | 2025-02-11 05:43:58 UTC |
Source: | https://github.com/tripati-lab/bayclumpr |
stan
.Bayesian regressions to calibrate the clumped isotopes paleothermometer using
stan
.
cal.bayesian( calibrationData, numSavedSteps = 3000, priors = "Informative", MC = TRUE )
cal.bayesian( calibrationData, numSavedSteps = 3000, priors = "Informative", MC = TRUE )
calibrationData |
The target calibration dataset. |
numSavedSteps |
Number of MCMC iterations to save. |
priors |
Either |
MC |
Multicore (TRUE/FALSE) |
This function is used to generate CI estimates at given intervals. It is currently used for plotting in BayClump.
cal.ci(data, from, to, length.out = 100)
cal.ci(data, from, to, length.out = 100)
data |
A |
from |
the lower limit in x. |
to |
the upper limit in x. |
length.out |
the number of breaks. |
Generate a synthetic dataset for clumped isotopes calibrations
cal.dataset(error = "S1", nobs = 1000)
cal.dataset(error = "S1", nobs = 1000)
error |
Error scenario: low (S1), Intermediate (S2), or High (S3) |
nobs |
Number of observations in the simulated dataset |
Fit Deming regression models on a given calibration dataset
cal.deming(data, replicates, samples = NULL)
cal.deming(data, replicates, samples = NULL)
data |
The calibration dataset |
replicates |
Number of bootstrap replicates |
samples |
Number of samples per bootstrap replicate |
Fit OLS regression models on a given calibration dataset
cal.ols(data, replicates, samples = NULL)
cal.ols(data, replicates, samples = NULL)
data |
The calibration dataset |
replicates |
Number of bootstrap replicates |
samples |
Number of samples per bootstrap replicate |
Generate a dataset reflecting the priors used to run the analyses
cal.prior(prior, n = 1000)
cal.prior(prior, n = 1000)
prior |
Informative or not |
n |
number of observations to simulate |
Fit weighted OLS regression models on a given calibration dataset
cal.wols(data, replicates, samples = NULL)
cal.wols(data, replicates, samples = NULL)
data |
The calibration dataset |
replicates |
Number of bootstrap replicates |
samples |
Number of samples per bootstrap replicate |
Fit York regression models on a given calibration dataset
cal.york(data, replicates, samples = NULL)
cal.york(data, replicates, samples = NULL)
data |
The calibration dataset |
replicates |
Number of bootstrap replicates |
samples |
Number of samples per bootstrap replicate |
This function generate temperature predictions (in 10^6/T2) based on a calibration dataset and target D47. Note that this approach additionally accounts for measured error in the target D47. This approach is congruent with the one used in McClelland et al. (2022).
rec.bayesian( calModel, recData, iter = 1000, mixed = FALSE, postcalsamples = NULL, MC = TRUE )
rec.bayesian( calModel, recData, iter = 1000, mixed = FALSE, postcalsamples = NULL, MC = TRUE )
calModel |
The stan model to be analyzed. |
recData |
The reconstruction dataset. |
iter |
Number of replicates to retain. |
mixed |
whether the model |
postcalsamples |
Number of posterior samples to analyze from the calibration step. |
MC |
Multicore (TRUE/FALSE) |
This function performs temp reconstruction (10^6/T^2 with T in K) for multiple replicates of the same target.
rec.clumped(recData, obCal)
rec.clumped(recData, obCal)
recData |
Reconstruction dataset |
obCal |
A |
Generate a dataset reflecting the priors used to run the analyses
rec.prior(prior, n = 1000)
rec.prior(prior, n = 1000)
prior |
Informative or not |
n |
number of observations to simulate |