predict.hamstr_fit: Interpolate Age Models at Arbitrary Depths

View source: R/posterior_methods.R

predict.hamstr_fitR Documentation

Interpolate Age Models at Arbitrary Depths

Description

predict method for class "hamstr_fit". Returns the posterior age models interpolated to arbitrary depths.

Usage

## S3 method for class 'hamstr_fit'
predict(
  object,
  type = c("age_models", "acc_rates"),
  depth = c("modelled", "data"),
  ...
)

Arguments

object

hamstr_fit object

type

age models "age_models" or accumulation rates "acc_rates"

depth

defaults to "modelled", which returns the modelled depths. "data" returns age models at the depths of the observations, or a numerical vector to specify depths. Accumulation rates are only returned at the modelled depths.

...

additional arguments to hamstr predict methods

Value

a tibble of hamstr age-depth model realisations

Examples

## Not run: 
fit <- hamstr(
  depth = MSB2K$depth,
  obs_age = MSB2K$age,
  obs_err = MSB2K$error
  )

predict(fit, depth = seq(1, 100, by = 10))
predict(fit, depth = "data")
predict(fit)
predict(fit, type = "acc_rates")

## End(Not run)


EarthSystemDiagnostics/baconr documentation built on Dec. 10, 2023, 4:35 a.m.