sampleEnsembleThenBinTs: sampleEnsembleThenBinTs

View source: R/bin.R

sampleEnsembleThenBinTsR Documentation

sampleEnsembleThenBinTs

Description

sampleEnsembleThenBinTs

Usage

sampleEnsembleThenBinTs(
  ts,
  binvec,
  ageVar = "age",
  uncVar = "paleoData_uncertainty1sd",
  defaultUnc = 1.5,
  ar = sqrt(0.5),
  bamModel = list(ns = 1, name = "bernoulli", param = 0.05),
  spread = TRUE,
  spreadBy = abs(mean(diff(binvec)))/10,
  spreadMax = as.numeric(stats::quantile(abs(diff(thisAge)), probs = 0.75, na.rm = TRUE)),
  gaussianizeInput = FALSE,
  alignInterpDirection = TRUE,
  scope = "climate"
)

Arguments

ts

a lipd_ts object

binvec

vector of time boundaries over which to bin

ageVar

specify the name the time variable (typically 'age' or 'year')

uncVar

specify the name the uncertainty variable

defaultUnc

a uncertainty to use if uncVar is NULL (default = 1.5 paleoData_units)

ar

Autocorrelation coefficient to use for modelling uncertainty on paleoData, what fraction of the uncertainties are autocorrelated? (default = sqrt(0.5); or 50 percent autocorrelated uncertainty)

bamModel

a list that describes the model to use in BAM (default = list(ns = 1, name = "bernoulli", param = 0.05))

spread

should values be interpolated between bins? (TRUE/FALSE)

spreadBy

if newAge is not supplied, what is the desired resolution of the spread values? If NA, the minimum age gap divided by 5 will be used

spreadMax

a limit to how many years a value can be interpolated across (given in years). If NA, no limit is imposed.

gaussianizeInput

Force values to gaussian distribution before analysis (TRUE/FALSE)

alignInterpDirection

multiply values by -1 if scope_interpDirection == negative (TRUE/FALSE)

scope

the scope of the project (typically "climate" (default) or "isotope")

Value

numeric vector of values of equal length to binvec


nickmckay/compositeR documentation built on Aug. 16, 2024, 5:37 p.m.