ssf: Simple Signal Free Standardization

ssfR Documentation

Simple Signal Free Standardization

Description

A simple implentation of the signal-free chronology

Usage

ssf(rwl, 
    method="Spline", 
    nyrs = NULL, 
    difference = FALSE,
    max.iterations = 25, 
    mad.threshold = 5e-4,
    recode.zeros = FALSE,
    return.info = FALSE, 
    verbose = TRUE)

Arguments

rwl

a rwl object with series as columns and years as rows such as that produced by read.rwl. See ‘Details’.

method

a character vector to determine the detrending method. See ‘Details’ below. Possible values are
c("Spline", "AgeDepSpline").

nyrs

a number controlling the smoothness of the fitted curve in methods. See ‘Details’ in detrend.series.

difference

a logical flag. Compute residuals by subtraction if TRUE, otherwise use division. See ‘Details’ in detrend.series

max.iterations

a numeric. The maximum number of iterations to be used in the fitting process. See ‘Details’.

mad.threshold

a numeric. The median absolute difference threshold used for a stopping criteria. See ‘Details’.

recode.zeros

a logical flag. Replace values of zero in rwl with 0.001 if TRUE.

return.info

a logical flag. If TRUE, details about models and data will be added to the return value. See ‘Value’.

verbose

a logical flag. Write out details to the screen?

Details

This function creates a simple signal-free chronology that loosely follows the procedures laid out on p75 of Melvin and Briffa (2008). This function is a lighter version of that procedure and users who want more control and refinement should look to the CRUST program decried in Melvin and Briffa (2014). These steps are described in more detail in Learning to Love R.

  1. Detrend each series using the selected method, calculate RWI by division (or subtraction), and create an initial mean-value chronology.

  2. Create signal-free measurements by dividing (or subtracting) each series of measurements by the chronology. If return.info is invoked these are returned in sfRW_Array.

  3. Rescale the signal-free measurements to their original mean. If return.info is invoked these are returned in sfRWRescaled_Array.

  4. If the sample depth is one, replace signal-free measurements with original measurements.

  5. Fit curves to signal free measurements.If return.info is invoked these are returned in sfRWRescaledCurves_Array.

  6. Get new growth indicies by dividing (or subtracting) the original measurements by curves in the last step. If return.info is invoked these are returned in sfRWI_Array.

  7. Create a mean-value chronology using the indicies from the prior step. If return.info is invoked these are returned in sfCrn_Mat.

  8. Repeat steps two through seven up to maxIter or until the madThreshold is reached. The stopping criteria is determined using the absolute difference between filtered chronologies generated in interation k and k-1. This is done with the residuals of a high-pass filter on the chronology using a cubic smoothing spline (caps) with the stiffness set as the median of the segment lengths of series contributing to the chronology. The stopping threshold is calculated as the median absolute difference of the kth and kth-1 chronologies weighted by the normalized sample depth. If return.info is invoked the residual chronologies are returned in hfCrnResids_Mat and the median absolute differences are returns in MAD_Vec.

The input object (rwl) should be of class rwl. If it not, the function will attempt to coerce it using as.rwl and a warning will be issued.

See the references below for further details on detrending. It's a dark art.

Value

An object of of class crn and data.frame with the signal-free chronology and the sample depth. The years are stored as row numbers.

If return.info is TRUE a list containing ouptput by iteration (k):

infoList

a list with information on the arguments used in the function call.

k

a numeric containing the number of iterations.

ssfCrn

the signal-free chronology as above.

sfRW_Array

an array of years by series by iteration (0:k) that holds the signal free measurements. The values in sfRW_Array[,,1] are what is used at the start of the iterative process (iteration 0) which here are the original data.

sfRWRescaled_Array

an array of years by series by iteration (0:k) that holds the rescaled signal free measurements. The values in sfRWRescaled_Array[,,1] are what is used at the start of the iterative process (iteration 0) which here are the original data.

sfRWRescaledCurves_Array

an array of years by series by iteration (0:k) that holds the rescaled signal free curve fits. The values in sfRWRescaledCurves_Array[,,1] are the curves used at the start of the iterative process (iteration 0).

sfRWI_Array

an array of years by series by iteration (0:k) that holds the detrended signal free measurements. The values in sfRWI_Array[,,1] are the RWI values at the start of the iterative process (iteration 0).

sfCrn_Mat

a matrix of years by iteration (0:k) that holds the calculated chronology. The values in sfCrn_Mat[,1] is the initial chronology from the start of the iterative process (iteration 0).

hfCrn_Mat

a matrix of years by iteration (0:k) that holds the calculated high-frequency chronology. The values in hfCrn_Mat[,1] is the initial high-frequency chronology from the start of the iterative process (iteration 0).

hfCrnResids_Mat

a matrix of years by k-1 that holds the differences between the kth and the kth-1 high frequency chronology residuals.

MAD_out

a vector containing the median absolute difference between iteration k and k-1.

Author(s)

Ed Cook provided Fortran code that was ported to R by Andy Bunn.

References

Melvin, TM, Briffa, KR (2008) A 'signal-free' approach to dendroclimatic standardisation. Dendrochronologia 26: 71–86 doi: 10.1016/j.dendro.2007.12.001

Melvin T. M. and Briffa K.R. (2014a) CRUST: Software for the implementation of Regional Chronology Standardisation: Part 1. Signal-Free RCS. Dendrochronologia 32, 7-20, doi: 10.1016/j.dendro.2013.06.002

Melvin T. M. and Briffa K.R. (2014b) CRUST: Software for the implementation of Regional Chronology Standardisation: Part 2. Further RCS options and recommendations. Dendrochronologia 32, 343-356, doi: 10.1016/j.dendro.2014.07.008

See Also

detrend. chron

Examples

library(stats)
data(wa082)
wa082_SSF <- ssf(wa082)
plot(wa082_SSF,add.spline=TRUE,nyrs=20)

wa082_SSF_Full <- ssf(wa082,method = "AgeDepSpline", 
  difference = TRUE, return.info = TRUE)
plot(wa082_SSF_Full$ssfCrn,add.spline=TRUE,nyrs=20)


dplR documentation built on June 22, 2024, 9:59 a.m.