xskel.ccf.plot: Skeleton Plot for Series and Master with Cross Correlation

View source: R/xskel.ccf.plot.R

xskel.ccf.plotR Documentation

Skeleton Plot for Series and Master with Cross Correlation

Description

...

Usage

xskel.ccf.plot(rwl, series, series.yrs = as.numeric(names(series)),
               win.start, win.width = 50, n = NULL,
               prewhiten = TRUE, biweight = TRUE, series.x=FALSE)

Arguments

rwl

a data.frame with series as columns and years as rows such as that produced by read.rwl.

series

a numeric or character vector. Usually a tree-ring series. If the length of the value is 1, the corresponding column of rwl is selected (by name or position) as the series and ignored when building the master chronology. Otherwise, the value must be numeric.

series.yrs

a numeric vector giving the years of series. Defaults to as.numeric(names(series)).

win.start

year to start window

win.width

an even integral value

n

NULL or an integral value 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.

series.x

logical flag indicating whether to make the series the x argument to ccf. See Details.

Details

This function produces a plot that is a mix of a skeleton plot and a cross-correlation plot. It’s used in crossdating.

The top panel shows the normalized values for the master chronology (bottom half) and the series (top half) in green. The values are the detrended and standardized data (e.g., RWI).

Similarly, the black lines are a skeleton plot for the master and series with the marker years annotated for the master on the bottom axis and series on the top. The text at the top of the figure gives the correlation between the series and master (green bars) as well as the percentage of agreement between the years of skeleton bars for the series and master. I.e., if all the black lines occur in the same years the percentage would be 100%.

The bottom panels show cross correlations for the first half (left) and second half of the time series using function ccf.

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.

The plot is built using the Grid package which allows for great flexibility in building complicated plots. However, these plots look best when they don’t cover too wide a range of years (unless the plotting device is wider than is typical). For that reason the user will get a warning if win.width is greater than 100 years.

Old-school skeleton plots to print on paper are made with skel.plot.

Value

None. Invoked for side effect (plot).

Author(s)

Andy Bunn. Patched and improved by Mikko Korpela.

See Also

ccf

Examples

library(utils)
data(co021)
dat <- co021
#corrupt a series
bad.series <- dat$"641143"
names(bad.series) <- rownames(dat)
bad.series <- delete.ring(bad.series,year=1825)
# good match
xskel.ccf.plot(rwl=dat,series=bad.series,win.start=1900,win.width=50)
# overlap missing ring
xskel.ccf.plot(rwl=dat,series=bad.series,win.start=1800,win.width=50)

dplR documentation built on June 22, 2024, 9:59 a.m.