Package 'bayclumpr'

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] , Hannah M. Carroll [aut] , Aradhna Tripati [aut]
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

Help Index


Bayesian regressions to calibrate the clumped isotopes paleothermometer using stan.

Description

Bayesian regressions to calibrate the clumped isotopes paleothermometer using stan.

Usage

cal.bayesian(
  calibrationData,
  numSavedSteps = 3000,
  priors = "Informative",
  MC = TRUE
)

Arguments

calibrationData

The target calibration dataset.

numSavedSteps

Number of MCMC iterations to save.

priors

Either Informative, Weak, or Uninformative on the slope and intercept.

MC

Multicore (TRUE/FALSE)


This function is used to generate CI estimates at given intervals. It is currently used for plotting in BayClump.

Description

This function is used to generate CI estimates at given intervals. It is currently used for plotting in BayClump.

Usage

cal.ci(data, from, to, length.out = 100)

Arguments

data

A data.frame with two columns named as beta and alpha. This should be the result of bootstrapping or the posterior distribution for a given calibration set.

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

Description

Generate a synthetic dataset for clumped isotopes calibrations

Usage

cal.dataset(error = "S1", nobs = 1000)

Arguments

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

Description

Fit Deming regression models on a given calibration dataset

Usage

cal.deming(data, replicates, samples = NULL)

Arguments

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

Description

Fit OLS regression models on a given calibration dataset

Usage

cal.ols(data, replicates, samples = NULL)

Arguments

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

Description

Generate a dataset reflecting the priors used to run the analyses

Usage

cal.prior(prior, n = 1000)

Arguments

prior

Informative or not

n

number of observations to simulate


Fit weighted OLS regression models on a given calibration dataset

Description

Fit weighted OLS regression models on a given calibration dataset

Usage

cal.wols(data, replicates, samples = NULL)

Arguments

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

Description

Fit York regression models on a given calibration dataset

Usage

cal.york(data, replicates, samples = NULL)

Arguments

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).

Description

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).

Usage

rec.bayesian(
  calModel,
  recData,
  iter = 1000,
  mixed = FALSE,
  postcalsamples = NULL,
  MC = TRUE
)

Arguments

calModel

The stan model to be analyzed.

recData

The reconstruction dataset.

iter

Number of replicates to retain.

mixed

whether the model calModel is mixed or not.

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.

Description

This function performs temp reconstruction (10^6/T^2 with T in K) for multiple replicates of the same target.

Usage

rec.clumped(recData, obCal)

Arguments

recData

Reconstruction dataset

obCal

A data.frame summarizing the distribution of slopes and intercepts


Generate a dataset reflecting the priors used to run the analyses

Description

Generate a dataset reflecting the priors used to run the analyses

Usage

rec.prior(prior, n = 1000)

Arguments

prior

Informative or not

n

number of observations to simulate