View source: R/xdate.floater.R
| xdate.floater | R Documentation |
Pulls an undated (or misdated) series through a dated rwl object
in order to establish possible dates for the series.
xdate.floater(rwl, series, series.name = "Unknown", min.overlap = 50,
n = NULL, prewhiten = TRUE, biweight = TRUE,
method = c("spearman", "pearson", "kendall"),
make.plot = TRUE, return.rwl = TRUE, verbose = TRUE)
## S3 method for class 'floater'
print(x, ...)
## S3 method for class 'floater'
plot(x, ...)
rwl |
a |
series |
a numeric vector of ring widths, e.g. a single column
from an |
series.name |
a |
min.overlap |
a positive integer giving the minimum number of
years of overlap required between the series and the master
chronology at each search position. Defaults to |
n |
|
prewhiten |
logical flag. If |
biweight |
logical flag. If |
method |
the correlation coefficient to use. One of
|
make.plot |
logical flag. If |
return.rwl |
logical flag. If |
verbose |
logical flag. If |
x |
a |
... |
additional arguments — currently ignored. |
The undated series is slid along the master chronology built from
rwl (using the leave-one-out principle) and the correlation
between the series and the master is computed at each position with
sufficient overlap. The position with the highest correlation gives
the proposed dates.
Both series and master are optionally prewhitened and/or smoothed
with a Hanning filter before correlation, consistent with the
approach used in corr.series.seg.
The two-panel plot (produced when make.plot = TRUE, or by
calling plot() on the returned object) shows: (1) a segment
plot of the master series with the floater at its best-fit position
highlighted in green; and (2) the correlation at each end-year
searched, overlaid with a dashed significance line and a light-blue
polygon showing the 5th–95th percentile band of the typical
interseries correlation in the master chronology. The dark-blue
horizontal line shows the median interseries correlation. The
best-fit position is marked with green points and a dashed segment.
If return.rwl = TRUE (the default), an object of class
"floater" is returned. This is a named list with the
following elements:
series.name |
the name given to the undated series. |
floaterCorStats |
a |
rwlCombined |
an |
rwlOut |
an |
If return.rwl = FALSE, only the floaterCorStats
data.frame is returned.
This function is experimental and may change in future releases. Users should always verify proposed dates visually and against the physical wood.
The choice of min.overlap affects both which search positions
are evaluated and the reliability of the correlations at those
positions. A short min.overlap allows the series to be placed
near the edges of the master chronology where little overlap exists,
producing correlations based on few observations that may be
spuriously high. A very long min.overlap restricts the search
to positions where the series is well inside the master, which is
statistically conservative but can cause the function to miss the
correct dates entirely if the true position lies near an edge, or to
produce wrong dates if the best correlation within the constrained
search window happens to be a false match. As a rule,
min.overlap should be long enough to produce a stable
correlation (50 years is a common starting point for annual
tree-ring data) but no longer than roughly half the length of the
undated series. The dashed significance line in the plot is
calculated from the overlap length at each position and provides a
useful guide: positions with short overlaps will have high
significance thresholds and should be interpreted with caution.
Andy Bunn. Patched and improved by Mikko Korpela.
corr.series.seg, ccf.series.rwl,
skel.plot, series.rwl.plot
library(utils)
data(co021)
summary(co021)
# Remove a series and try to recover its dates
foo <- co021[, "645232"]
bar <- co021
bar$"645232" <- NULL
out <- xdate.floater(bar, foo, min.overlap = 50, series.name = "645232")
print(out)
# A longer series. With min.overlap = 100 the correct dates are recovered.
# With min.overlap = 200 the search window is so constrained that the true
# position is excluded and the function returns the best match within the
# remaining positions, which is a false fit. Compare the two results.
foo <- co021[, "646118"]
bar <- co021
bar$"646118" <- NULL
out <- xdate.floater(bar, foo, min.overlap = 100, series.name = "646118")
out <- xdate.floater(bar, foo, min.overlap = 200, series.name = "646118")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.