dcc(chrono, climate, selection = -6:9, method = "response",
moving = FALSE, win_size = 25, win_offset = 1, start_last = TRUE,
timespan = NULL, var_names = NULL, ci = 0.05, boot = "stationary",
sb = TRUE)data.frame containing a tree-ring
chronologies, e.g. as obtained by chron of package dplR.data.frame or matrix with
climatic data in monthly resolution, with year, month and climate
parameters in columns (all columns except year and month will be
recognized as parameters for response or correlation function),character string specifying the calculation
method. Possible values are logical; should the analyis be carried out in
moving windows. Defaults to FALSE.logical flag indicating whether the first
window should start at the rear end (youngest part of the series)
or not.integer vector of length 2 specifying the
time interval (in years) to be considered for analysis. Defaults
to the maximum possible interval.character vector with variable
names. Defaults to corresponding column names of data.frame
clim.numerical value to set the test level for
significance test (values 0.01, 0.05 and 0.1 are allowed); the
confidence intervals are adapted accordingly.character indicating which bootstrap method
should be used, one of c("stationary", "std", "exact")logical flag indicating whether textual status
bar for moving case should be suppressed. Suppression is
recommended for e.g. Sweave files.The functions 'summary' and 'plot' are used to obtain and print a summary of the results, and to create a plot. The function 'coef' can be used to extract the coefficients.
An object of class '"tc_dcc"' is a list containing at least the following components:
data.frame such as produced
by function chron of package dplR. It has to be a
data.frame with at least one column containing the tree-ring
indices, and the corresponding years as rownames.
For climatic input data, there are three possibilities: Firstly,
input climatic data can be a data.frame or matrix
consisting of at least 3 rows for years, months and at least one
climate parameter in the given order. Secondly, input climatic
data can be a single data.frame or matrix in the
style of the original DENDROCLIM2002 input data, i.e. one
parameter with 12 months in one row, where the first column
represents the year. Or thirdly, input climatic data can be a list
of several of the latter described data.frame or
matrices. As an internal format dispatcher checks the
format automatically, it is absolutely necessary that in all three
cases, only complete years (months 1-12) are provided. It is not
possible to mix different formats in one go.
Parameters can be selected with the 'selection' parameter in two
different ways. The default value is -6:9. This is equivalent to
the standard settings in DENDROCLIM2002 and bootRes, and selects
from all climate variables all months from previous year's June
(-6, previous year's months are specified as negative integers) to
current years September (9, months of the current year are
specified as positive integers) as model parameters.
More complex parameter selections can be obtained by the
modifiers provided in treeclim: .range,
.mean, and .sum. .range corresponds the
example above, where all specified months are used, while
.sum and .mean will use the sums and means of the
specified months. These modifiers also allow to select specific
climatic variables, addressed by name. Thus, .mean(4:8,
"temp") will select the mean for climate parameter "temp" for the
months April to August. Not only ranges, but also individual
vectors can be used for month specification, like e.g.,
.range(c(1, 3, 4, 5).
The modifiers can be chained together using the '+' symbol, which
makes it possible to create arbitrarily complex selections of
climate parameters for calibration. E.g., .mean(2:5,
"temp") + .sum(2:5, "prec") will yield the February-to-May mean
for the variable "temp" and the sum of the variable "prec" for the
same time. While there is no limitation for number of lists that
can be chained together, 'dcc' will not check for meaningful
specifications. Testing smart hypotheses is up the researcher.
For the exclusion of months, the convenience function
excludefrom() (or short exfr()) is provided. E.g.,
.range(excludefrom(-6:10, -11:3)) will yield the monthly
values of all parameters for the months previous June (-6) to
current October (10), but without the months previous November
(-11) to current March (3) in between. While it is also possible
to supply arbitrary vectors as month specification, and not only
ranges as shown in most of the examples here, this way of
excluding e.g. the dormant season is far more convenient.
1000 bootstrap samples are taken from the original distributions
of climate and tree-ring data, either using the stationary
bootstrap (Politis and Romano 1994, boot = "stationary") or
classical bootstrap (DENDROCLIM2002-style, boot =
"std"). The stationary bootstrap mimics the stationary properties
of the original time series in the resampled time series by
resampling within blocks. Within each block, the number of
observations is random and has a geometric
distribution. Consequently, the choice of the distribution
parameter will affect the autocorrelation structure of the
resampled time series. Optimal (expected) block length is chosen
according to Politis and White (2004). In the case of response
function analysis, an eigen decomposition of the standardized
predictor matrix is performed. Nonrelevant eigenvectors are
removed using the PVP criterion (Guiot, 1990), principal component
scores are then calculated from the matrices of reduced
eigenvectors and standardized climatic predictors. Response
coefficients are found via singular value decomposition, and
tested for significance using the 95% percentile range method
(Dixon, 2001). In case of correlation function analysis, the
coefficients are Pearson's correlation coefficients. The same
method for significance testing is applied.
There is also the option to use exact bootstrapping like
implemented in seascorr (Meko et al. 2011, boot =
"exact"). In this case, circulant embedding is used to simulate
the tree-ring data 1000 times as time series with the same
frequency characteristics like the original time-series (Percival
& Constantine, 2006). Empirical non-exceedence probabilities are
used to test the coefficients of the response/correlation function
with the original data for significance. For the exact
bootstrapping case, no confidence intervals for the
response/correlation coefficients can be computed.Patton, A. and D.N. Politis and H. White (2009), "CORRECTION TO Automatic block-length selection for the dependent bootstrap" by D. Politis and H. White", Econometric Reviews 28(4), 372-375.
Politis, D.N. and H. White (2004), Automatic block-length selection for the dependent bootstrap, Econometric Reviews 23(1), 53-70.
dc_resp <- dcc(muc_spruce, muc_clim)Run the code above in your browser using DataLab