| rcs | R Documentation |
Detrend multiple ring-width series simultaneously using a regional curve.
rcs(rwl, po = NULL, nyrs = NULL, f = 0.5, biweight = TRUE, ratios = TRUE,
rc.out = FALSE, make.plot = TRUE, method = c("caps", "ads"),
min.n = NULL, pos.slope = TRUE, ...)
rwl |
a |
po |
a |
nyrs |
a number giving the rigidity of the smoothing spline.
For |
f |
a number between 0 and 1 giving the frequency response or wavelength cutoff. Defaults to 0.5. |
biweight |
|
ratios |
|
rc.out |
|
make.plot |
|
method |
a |
min.n |
an optional integer giving the minimum sample depth
required at a given cambial age for that age to be included when
fitting the regional curve. Ages where fewer than |
pos.slope |
a |
... |
other arguments passed to
|
This method detrends and standardizes tree-ring series by calculating
an age-related growth curve specific to the rwl. The
detrending is the estimation and removal of the tree’s natural
biological growth trend. The standardization is done by either
dividing each series by the growth trend or subtracting the growth
trend from each series to produce units in the dimensionless
ring-width index (RWI). The option to produce indices by
subtraction is intended to be used on series that have been subject to
variance stabilization (e.g., using powt).
Two smoothers are available for fitting the regional curve. The
default (method = "caps") uses a cubic smoothing spline where
the frequency response is 0.50 at a wavelength of 10 percent of the
maximum cambial age unless specified differently via nyrs
and f (see caps). The alternative
(method = "ads") uses an age-dependent spline whose stiffness
increases with cambial age, which may better preserve low-frequency
variability in the biological trend (see ads).
The min.n argument can be used to truncate the regional
curve where sample depth becomes thin, preventing poorly replicated
tail ages from influencing the fit.
This attempts to remove the low frequency variability that is due to biological or stand effects. See the references below for further details on detrending in general, and Biondi and Qeadan (2008) for an explanation of RCS.
A data.frame containing the dimensionless and detrended
ring-width indices with column names, row names and dimensions of
rwl. If rc.out is TRUE then a
list will be returned with a data.frame containing the
detrended ring widths as above and a vector containing the
regional curve.
Code provided by DendroLab based on programming by F. Qeadan and
F. Biondi, University of Nevada Reno, USA and adapted for
dplR by Andy Bunn. Patched and improved by Mikko Korpela. Extended
with method, min.n, and pos.slope arguments by
Andy Bunn.
Biondi, F. and Qeadan, F. (2008) A theory-driven approach to tree-ring standardization: Defining the biological trend from expected basal area increment. Tree-Ring Research, 64(2), 81–96.
Cook, E. R. and Kairiukstis, L. A., editors (1990) Methods of Dendrochronology: Applications in the Environmental Sciences. Springer. ISBN-13: 978-0-7923-0586-6.
Fritts, H. C. (2001) Tree Rings and Climate. Blackburn. ISBN-13: 978-1-930665-39-2.
detrend, chron, cms,
caps, ads
library(utils)
data(gp.rwl)
data(gp.po)
## Basic use: caps smoother (default), return indices only
gp.rwi <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
make.plot = FALSE)
str(gp.rwi)
## Return the regional curve alongside the indices
gp.out <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
rc.out = TRUE, make.plot = FALSE)
str(gp.out)
## Plot the regional curve with a title
rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
rc.out = FALSE, make.plot = TRUE, main = "Regional Curve")
## Use the age-dependent spline smoother instead of caps
gp.rwi.ads <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "ads", rc.out = FALSE, make.plot = FALSE)
## Truncate the regional curve where fewer than 5 series contribute.
## Indices for rings beyond the truncated curve are returned as NA.
gp.out.trunc <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "ads", min.n = 5,
rc.out = TRUE, make.plot = FALSE)
## Compare the two smoothers visually
op <- par(no.readonly = TRUE)
par(mfrow = c(1, 2))
rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "caps", make.plot = TRUE, main = "caps")
rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "ads", make.plot = TRUE, main = "ads")
par(op)
## Compare caps and ads indices for one series
gp.caps <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "caps", rc.out = FALSE, make.plot = FALSE)
gp.ads <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
method = "ads", rc.out = FALSE, make.plot = FALSE)
cor(gp.caps[[1]], gp.ads[[1]], use = "complete.obs")
## Use subtraction rather than division (e.g. after variance stabilization)
gp.rwi.sub <- rcs(rwl = gp.rwl, po = gp.po, biweight = TRUE,
ratios = FALSE, make.plot = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.