bchron_model: Run a modified version of the Bchronology algorithm from the...

View source: R/bchron_model.R

bchron_modelR Documentation

Run a modified version of the Bchronology algorithm from the R package "Bchron" (Haslett and Parnell, 2008)

Usage

bchron_model(
  ages,
  ageSds,
  positions,
  positionThicknesses = rep(0, length(positions)),
  ids,
  distTypes = rep("G", length(ages)),
  iterations = 10000,
  burn = 2000,
  probability = 0.95,
  predictPositions = seq(min(positions), max(positions), length = 500),
  truncateUp = 0,
  extrapUp = 100,
  truncateDown = 1e+10,
  extrapDown = 100
)

Arguments

ages

Vector of ages

ageSds

Vector of 1-sigma values for ages. Must be the same length and given in the same order as ages

positions

Vector of stratigraphic positions for ages. Must be the same length and given in the same order as ages. Must be input as distance above base of section.

positionThicknesses

Vector of stratigraphic uncertainties for each age. Specified as half thicknesses. Must be the same length and given in the same order as ages

ids

Vector of sample names for each age. All samples with the same ids will be combined into a single age PDF. Must be the same length and given in the same order as ages

distTypes

c('G','U') Vector of distribution types to model each age as. Choices are 'G' for Gaussian, and 'U' uniform. Must be the same length and given in the same order as ages

iterations

Number of MCMC iteration to run for. Defaults to 10000

burn

Number of initial iterations to discard. Defaults to 2000

predictPositions

Vector of stratigraphic positions to evaluate the model at. Defaults to 500 evenly spaced points from the bottom to top of the section

truncateUp

Truncation age for extrapolating above the top of the section. Defaults to 0

extrapUp

Number of extrapolations to perform above the top of the section. defaults to 100

truncateDown

Truncation age for extrapolation below the bottom of the section. Defaults to 1e10 (a really big number)

extrapDown

Number of extrapolations to perform below the bottom of the section. defaults to 100

prob

Desired confidence to return. Defaults to 95

\item

adaptShould the proposal standard deviation for model parameters be determined using the adaptive proposal algorithm of Haario et al., 1998. Defaults to TRUE

\item

mhSDMetropolis-Hastings proposal standard deviation for the age parameters. If adapt = TRUE it will be determined by the model run. Otherwise a vector of standard deviations must be specified with length = unique(ids)

\item

psiSDMetropolis-Hastings proposal standard deviation for the Compound Poisson-Gamma scale parameter. If adapt = TRUE it will be determined by the model run.

\item

muSDMetropolis-Hastings proposal standard deviation for the Compound Poisson-Gamma mean parameter. If adapt = TRUE it will be determined by the model run.

HDI = specified probability highest density interval for the model run

model = Raw model predictions for each MCMC iteration

thetas = The posterior values for each dated horizon from each MCMC run. burn is not removed.

predictPositions = Stratigraphic positions where the model was evaluated. Same as predictPositions

mu, psi = The posterior values for the Compound Poisson-Gamma mean and scale parameters. burn is not removed.

ageGrid = Grid that age PDFs were evaluated over. Useful for plotting

likelihoods = Age PDFs for each set of dated samples. Useful for plotting

nAges = Number of ages that were combined into each sample. Useful for plotting

masterPositions = Stratigraphic positions for each set of combined ages. Useful for plotting

ids = Vector of unique sample names. Useful for plotting Run a modified version of the Bchronology algorithm from the R package "Bchron" (Haslett and Parnell, 2008)


robintrayler/modifiedBChron documentation built on April 16, 2023, 6:28 p.m.