This function calculates the cross-correlation function between a
tree-ring series and a master chronology built from rwl
looking at correlations lagged positively and negatively using
ccf
at overlapping segments set by
seg.length
. For instance, with lag.max
set
to 5, cross-correlations would be calculated at for each segment with
the master lagged at k = -5:5
years.
The cross correlations are calculated calling
ccf
as
ccf(x=master, y=series, lag.max=lag.max, plot=FALSE)
if series.x
is
FALSE
and as ccf(x=series, y=master, lag.max=lag.max, plot=FALSE)
if
series.x
is TRUE
. This argument was introduced in dplR version 1.7.0.
Different users have different expectations about how missing or extra rings are
notated. If switch.x = FALSE
the behavior will be like COFECHA where a missing
ring in a series produces a negative lag in the plot rather than a positive lag. See the
crossdating vignette xdate-dplR
for more information.
Correlations are calculated for the first segment, then the
second segment and so on. Correlations are only calculated for segments with
complete overlap with the master chronology.
Each series (including those in the rwl
object) is
optionally detrended as the residuals from a hanning
filter with weight n
. The filter is not applied if
n
is NULL
. Detrending can also be done via
prewhitening where the residuals of an ar
model are
added to each series mean. This is the default. The master chronology
is computed as the mean of the rwl
object using
tbrm
if biweight
is TRUE
and
rowMeans
if not. Note that detrending typically changes the
length of the series. E.g., a hanning
filter will
shorten the series on either end by floor(n/2)
. The
prewhitening default will change the series length based on the
ar
model fit. The effects of detrending can be seen with
series.rwl.plot
.