ssf | R Documentation |
A simple implentation of the signal-free chronology
ssf(rwl,
method="Spline",
nyrs = NULL,
difference = FALSE,
max.iterations = 25,
mad.threshold = 5e-4,
recode.zeros = FALSE,
return.info = FALSE,
verbose = TRUE)
rwl |
a |
method |
a |
nyrs |
a number controlling the smoothness of the
fitted curve in methods. See ‘Details’ in |
difference |
a |
max.iterations |
a |
mad.threshold |
a |
recode.zeros |
a |
return.info |
a |
verbose |
a |
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.
Detrend each series using the selected method, calculate RWI by division (or subtraction), and create an initial mean-value chronology.
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
.
Rescale the signal-free measurements to their original mean. If return.info
is invoked these are returned in sfRWRescaled_Array
.
If the sample depth is one, replace signal-free measurements with original measurements.
Fit curves to signal free measurements.If return.info
is invoked these are returned in sfRWRescaledCurves_Array
.
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
.
Create a mean-value chronology using the indicies from the prior step. If return.info
is invoked these are returned in sfCrn_Mat
.
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.
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 |
k |
a |
ssfCrn |
the signal-free chronology as above. |
sfRW_Array |
an |
sfRWRescaled_Array |
an |
sfRWRescaledCurves_Array |
an |
sfRWI_Array |
an |
sfCrn_Mat |
a |
hfCrn_Mat |
a |
hfCrnResids_Mat |
a |
MAD_out |
a |
Ed Cook provided Fortran code that was ported to R by Andy Bunn.
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
detrend
. chron
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.