Skip to contents

Given a downcore invert_d2H() reconstruction posterior with full draws (return_full = TRUE), report (a) the posterior probability that the difference in mean d2H_precip between two stratigraphic intervals exceeds user-supplied magnitudes, and (b) the within- record 95\ 4.5.3:

Usage

detect_change(
  reconstruction,
  age,
  baseline_interval,
  test_intervals = NULL,
  sigma_residual,
  sigma_analytical = 3,
  rho_t = NULL,
  beta_eff,
  confidence = 0.95,
  magnitudes = NULL
)

Arguments

reconstruction

Output of invert_d2H(..., return_full = TRUE) on a downcore series. Must contain a posterior_draws matrix of shape n_iter x n_samples.

age

Numeric vector, length n_samples, of sample ages matching the reconstruction columns.

baseline_interval

Length-2 numeric c(min, max) defining the baseline window in age units.

test_intervals

Either a length-2 numeric vector for a single test window, or a named list of length-2 numerics for multiple windows. NULL skips the per-interval probability table and returns only the threshold.

sigma_residual

Numeric, required, the model's posterior residual SD on the leaf-wax per-mil scale (sigma, approximately 16 per mil for the spatial models; see Section 4.5.3).

sigma_analytical

Numeric, the analytical uncertainty on d2H_wax measurements in per mil (default 3).

rho_t

Numeric, lag-1 temporal autocorrelation. Use estimate_temporal_autocorrelation() to compute. Defaults to 0 (independent samples) with a message.

beta_eff

Numeric, the local effective slope. Use local_effective_slope() for a point estimate (e.g., its median).

confidence

Numeric in (0, 1), the confidence level for the detection threshold. Default 0.95.

magnitudes

Optional numeric vector of magnitudes (per mil) to evaluate posterior Pr(|delta| > magnitude) against.

Value

A list with elements:

  • threshold - the detection threshold on d2H_precip at the requested confidence level.

  • formula - the components used: z, rho_t, sigma_residual, sigma_analytical, beta_eff.

  • intervals - a data frame with one row per test interval reporting the posterior median and CI of delta and (if magnitudes supplied) the posterior probability of exceeding each magnitude.

Details

$$\mathrm{threshold}_{precip} = \frac{z_{\alpha/2}\, \sqrt{2(1 - \rho_t)}\, \sqrt{\sigma_{residual}^2 + \sigma_{analytical}^2}} {\beta_{\mathrm{eff}}}$$

The threshold is the smallest difference in d2H_precip between two independent samples that can be distinguished from within-record noise at the chosen confidence level. The spatial GP intercept contributes a constant to every sample in the record and cancels in the contrast; the same sigma_residual from the spatial calibration applies (manuscript Section 4.5.3).