corr.rwl.seg(rwl,seg.length=50,bin.floor=100,n=NULL, prewhiten = TRUE,
pcrit=0.05, biweight=TRUE, make.plot = TRUE,...)
data.frame
with series as columns and years as rows
such as that produced by read.rwl
.integer
giving length of segments in years
(e.g., 20, 50, 100 years).integer
giving the base for locating
the first segment (e.g.,.1600, 1700, 1800 AD). Typically 0, 10, 50, 100,
etc.NULL
or an integer giving the filter length for the
hanning
filter used for removal of low frequency
variation.logical
flag. If TRUE
each series is whitened using
ar
.logical
flag. If TRUE
then a robust mean is calculated
using tbrm
.logical flag
indicating whether to make a plot.list
containing matrices spearman.rho
, p.val
,
overall
, bins
, vector avg.seg.rho
. An additional
character flags
is also returned if any segments fall below the critical
value. Matrix spearman.rho
contains the correlations each series by bin.
Matrix p.val
contains the p-values on the correlation for each series
by bin. Matrix overall
contains the average correlation and p-value for
each series. Matrix bins
contains the years encapsulated by each bin.
The vector avg.seg.rho
contains the average correlation for each bin.bin.floor
.
Correlations are calculcated 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 (inlcuding 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
rwl object using tbrm
if biweight=TRUE
and rowMeans
if not. Note that detrending can change the length of the series. E.g., a
hanning
filter will shorten the series on either end by
floor(n/2)
. The effects of detrending can be seen with
series.rwl.plot
.
The function is typically invoked to produce a
plot where each segment for each series is colored by its correlation to the
master chronology. Green segments are those that do not overlap completely
with the width of the bin. Blue segments are those that correlate above the
user-specified critical value. Red segments are those that correlate below the
user-specified critical value and might indicate a dating problem. NOTE: this
function is slow for large rwl objects and will remain so until a C or
Fortran loop is coded to perform the correlations.corr.series.seg
skel.plot
series.rwl.plot
ccf.series.rwl
data(co021)
corr.rwl.seg(co021,seg.length=100)
Run the code above in your browser using DataLab