Skip to contents

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

if (FALSE) { # \dontrun{
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")
} # }