cpts_ar: Identifying changes in mean and variance of accumulation-rate...

View source: R/cpt_ar.R

cpts_arR Documentation

Identifying changes in mean and variance of accumulation-rate records

Description

Determines zone boundaries for single proxy accumulation-rate records based on change-point analysis and checks for the influence of sediment-accumulation rates on the detected change points.

Usage

cpts_ar(
  serie,
  series_name = NULL,
  proxy = NULL,
  n_rand = 1000,
  bootstrap = FALSE,
  rand_ds_distr = "uniform",
  max_cpts = 50,
  n_screen = 0.025,
  tau = NULL,
  meth_cpt = "BinSeg",
  pen_method = "Manual",
  pen_val = "4*log(n)",
  t_stat = "Normal",
  minseglen = 2
)

Arguments

serie

A list returned from the pretreatment_data() function. NB: the pretreatment_data() function must be run with the argument out = "accI".

series_name

A character string giving the name of the data set, or typically the site name (optional).

proxy

A character string giving the name (typically the column name) of the variable that should be analysed.

n_rand

Positive integer giving the number of iterations used to check for change-points in random data sets (by default n_rand = 1000).

bootstrap

Logical. Determines how the random data sets are generated. If TRUE, then each of the n_rand random data sets are generated by random sampling with replacement from the input data. If FALSE, then the code generates in each of the n_rand iterations a vector of random concentration values having a user-specified distribution (based on rand_ds_distr).

rand_ds_distr

A character string giving the distribution used to generate the random data sets when bootstrap = FALSE. Currently only "uniform" is supported (default). The random values range between the minimum and the maximum concentration values of the re-sampled series.

max_cpts

Positive integer giving the maximum number of change points to search for when meth_cpt = "BinSeg". By default max_cpts = 50).

n_screen

Positive number giving the minimum frequency of occurrence of change-points in the random data sets to be validated. By default, n_screen = 0.025. Thus, with n_rand = 1000 this equals a 2.5% chance of occurrence.

tau

Positive integer giving the tolerance search window (in years) for change points in the 'true proxy-accumulation rate' record. By default tau = the number of years the raw record was re-sampled to (as of variable yr.interp that is written in the list generated with the pretreatment_data() function).

meth_cpt

As of changepoint::cpt.meanvar(): choice of "AMOC", "PELT", "BinSeg", or "SegNeigh". But note that "SegNeigh" is computationally slow, use other methods instead.

pen_method

Refer to changepoint::cpt.meanvar() for argument penalty. By default, pen_method = "Manual".

pen_val

Refer to changepoint::cpt.meanvar() for the argument pen.value. By default, pen_val = "4*log(n)", where n is equal to the number of observations.

t_stat

Refer to changepoint::cpt.meanvar() for the argument test.stat. Currently only "Normal" is supported (default).

minseglen

Positive integer giving the minimum number of observations within zones. By default minseglen = 2, see also changepoint::cpt.meanvar().

Details

This function is used to determine if any of the change points of a proxy-accumulation record is strongly influenced by the modeled sediment-accumulation rates. The function performs a change-point analysis with the 'true' proxy-accumulation record (based on the effective concentration values), and in addition it performs a change-point analysis on a set (by default n_rand = 1000) of non-sense proxy-accumulation records (based on randomly drawn concentration values). The change points of the latter records (hereafter, non-sense change points) are then first screened based on their frequency of occurrence (n_screen, as some change points may occur by chance). Thereafter, the change points are screened further to retain those that separate zones where the mean proxy-accumulation rate changes in the same direction as the mean sediment-accumulation rate. The rationale being that if a change point of the 'true proxy-accumulation record' matches a non-sense change point (with a tolerance search window equal to tau), and if both records change in the same direction (say, both the proxy-accumulation rate and the sediment-accumulation rate increase across a change point), then the change point of the proxy-accumulation rate may be strongly influenced by sediment-accumulation rates (proxy_ar = proxy_conc * sed_ar).

Value

a list with the depths and ages of the change points, the mean values for the zones, as well as the settings of the change-point analysis.

In addition, a diagnostic plot consisting of three panels is sent to the device. The plot includes (from top to bottom):

  • the re-sampled concentration values,

  • the sediment-accumulation rate, and

  • the proxy accumulation-rate record.

The latter panel may show:

  • change points of the proxy accumulation-rate record (blue vertical lines),

  • mean proxy accumulation-rate values for the zones (red horizontal lines),

  • non-sense change points that match 'true change points' (red circles),

  • non-sense change points that do not match 'true change points' (green circles),

Author(s)

Walter Finsinger

References

Finsinger W, Magyari EK, Fevre J, Orban I, Pal I, Vincze I, Hubay K, Birks HH, Braun M, Toth M (2016) Holocene fire regimes near the treeline in the Retezat Mts. (Southern Carpathians). Quaternary International, 477, 94-105. 10.1016/j.quaint.2016.04.029.

Killick R, Eckley IA (2014). changepoint: An R Package for Changepoint Analysis. Journal of Statistical Software, 58(3), 1-19.

See Also

cpt.meanvar, pretreatment_data

Examples

## Not run: 
co <- tapas::co_char_data
co_i <- tapas::pretreatment_data(co, out = "accI")

## change-point analysis with default options
co_i_cpts <- cpts_ar(co_i, proxy = "char")

## change-point analysis with higher penalty value
co_i_cpts_8logn <- cpts_ar(co_i, proxy = "char", pen_val = "8*log(n)")

## Change-point analysis with the 'red noise' record (no change point)
rdn <- tapas::red_noise
rdn_i <- tapas::pretreatment_data(rdn)
rdn_i_cpts <- tapas::cpts_ar(rdn_i, proxy = "char")


## As in the example above, but introducing a step-wise increase in the
## sediment-accumulation rate [cm/yr]
## NB: sar = 1/sediment-deposition time [yr/cm]
sdt <- c(rep_len(10, length.out = 100), rep_len(25, length.out = 360))
a_bot <- cumsum(sdt)
rdn2 <- rdn[1:length(a_bot), ]
rdn2$age_bot <- a_bot
rdn2$age_top <- a_bot - sdt
rdn2_i <- tapas::pretreatment_data(rdn2, yrInterp = 25)
rdn2_i_cpts <- tapas::cpts_ar(rdn2_i, proxy = "char")

## End(Not run)


wfinsinger/tapas documentation built on Aug. 22, 2024, 4:28 a.m.