Learn R Programming

treeclim (version 1.0.13)

dcc: Response and correlation function analysis

Description

This function calculates (potentially moving) response and correlation functions from tree-ring chronologies and monthly climatic data. For the moving case, the calculation is performed repeatedly for consecutive time windows. Function parameters may be bootstrapped to calculate their significance and confidence intervals.

Usage

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)

Arguments

chrono
data.frame containing a tree-ring chronologies, e.g. as obtained by chron of package dplR.
climate
either a 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),
selection
either a numeric vector, a modifier, or a chain of modifiers specifying the parameter selection for the model (see Details).
method
character string specifying the calculation method. Possible values are response and correlation. Partial strings are ok.
moving
logical; should the analyis be carried out in moving windows. Defaults to FALSE.
win_size
integer giving the window size for each recalculation in years.
win_offset
integer giving the number of years between each window start in years.
start_last
logical flag indicating whether the first window should start at the rear end (youngest part of the series) or not.
timespan
integer vector of length 2 specifying the time interval (in years) to be considered for analysis. Defaults to the maximum possible interval.
var_names
character vector with variable names. Defaults to corresponding column names of data.frame clim.
ci
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.
boot
character indicating which bootstrap method should be used, one of c("stationary", "std", "exact")
sb
logical flag indicating whether textual status bar for moving case should be suppressed. Suppression is recommended for e.g. Sweave files.

Value

  • 'dcc' returns an 'object' of class '"tc_dcc"'.

    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:

  • callthe call made to function 'dcc'
  • coefthe coefficients, themselves being an object of class 'tc_coef' for the static case, and of class 'tc_mcoef' for the moving case. Objects of class 'tc_coef' are single data.frames, while objects of class 'tc_mcoef' are lists of seperate data.frames for the coefficients ($coef), upper and lower confidence interval ($ci_upper and $ci_lower), and significance flags ($significant)
  • designthe design matrix on which this call to 'dcc' operates
  • truncatedthe input data truncated to the common timespan or the specified timespan
  • originalthe original input data, with the climate data being recast into a single data.frame

Details

This function builds upon and extents the functionality of programme DENDROCLIM2002 (Biondi and Waikul, 2004), and will calculate bootstrapped (and non-bootstrapped) moving and static response and correlation functions in a similar fashion as described in the above mentioned paper. Important extensions include a very flexible parameter selection model (see below), the possibility to use an unlimited number of climate parameters, and the option to use exact bootstrapping. Input chronology data can be a 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.

References

Biondi, F & Waikul, K (2004) DENDROCLIM2002: A C++ program for statistical calibration of climate signals in tree-ring chronologies. Computers & Geosciences 30:303-311 Dixon, PM (2001) Bootstrap resampling. In: El-Shaarawi, AH, Piegorsch, WW (Eds.), The Encyclopedia of Environmetrics. Wiley, New York. Guiot, J (1991) The boostrapped response function. Tree-Ring Bulletin 51:39-41 Meko DM, Touchan R, Anchukaitis KJ (2011) Seascorr: A MATLAB program for identifying the seasonal climate signal in an annual tree-ring time series. Computers & Geosciences 37:1234-241 Percival DB, Constantine WLB (2006) Exact simulation of Gaussian Time Series from Nonparametric Spectral Estimates with Application to Bootstrapping. Statistics and Computing 16:25-35

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.

Examples

Run this code
dc_resp <- dcc(muc_spruce, muc_clim)

Run the code above in your browser using DataLab