series.rwl.plot {dplR} | R Documentation |
Compute correlation between a tree-ring series and a master chronology by segment.
series.rwl.plot(rwl,series,series.yrs=as.numeric(names(series)), seg.length=100,bin.floor=100,n=NULL, prewhiten = TRUE, biweight=TRUE, ...)
rwl |
a data.frame with series as columns and years as rows
such as that produced by read.rwl . |
series |
a numeric vector. Usually a tree-ring series. |
series.yrs |
a numeric vector giving the years of series .
Defaults to as.numeric(names(series)) . |
seg.length |
an even integer giving length of segments in years
(e.g., 20, 50, 100 years). |
bin.floor |
a positive integer giving the base for locating
the first segment (e.g.,.1600, 1700, 1800 AD). Typically 0, 10, 50, 100,
etc. |
n |
NULL or an integer giving the filter length for the
hanning filter used for removal of low frequency
variation. |
prewhiten |
logical flag. If TRUE each series is whitened using
ar . |
biweight |
logical flag. If TRUE then a robust mean is calculated
using tbrm . |
... |
other arguments passed to plot. |
The function is typically invoked to produce a plot showing a time series plot of the series and the master as well as a scatterplot of series vs. master. The series and master are returned as well.
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
.
A list
containing the filtered vectors series
and master
.
Andy Bunn
corr.rwl.seg
corr.series.seg
skel.plot
ccf.series.rwl
data(co021) dat=co021 flagged=dat$'646244' names(flagged)=rownames(dat) dat$'646107'=NULL foo=series.rwl.plot(rwl=dat,series=flagged,seg.length=100,n=5) #note effect of n on first year in the series foo=series.rwl.plot(rwl=dat,series=flagged,seg.length=100,n=13,prewhiten=FALSE) bar=series.rwl.plot(rwl=dat,series=flagged,seg.length=100,n=7,prewhiten=FALSE) head(foo$series) head(bar$series)