Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Package ‘treeclim’

October 8, 2020
Type Package
Title Numerical Calibration of Proxy-Climate Relationships
Version 2.0.5.1
Date 2020-09-29
Depends R (>= 3.0.2), base, stats, utils, Rcpp (>= 0.10.6)
Imports abind, plyr, ggplot2, lmtest, lmodel2, np, boot
LinkingTo Rcpp, RcppArmadillo (>= 0.4.000.2)
Suggests testthat (>= 2.99.0.9000)
Description Bootstrapped response and correlation functions,
seasonal correlations and evaluation of reconstruction
skills for use in dendroclimatology and dendroecology,
see Zang and Biondi (2015) <doi:10.1111/ecog.01335>.
NeedsCompilation yes
License GPL-3
LazyData yes
RoxygenNote 7.1.1
Encoding UTF-8

URL https://github.com/cszang/treeclim

BugReports https://github.com/cszang/treeclim/issues
Author Christian Zang [aut, cre, cph, trl],
Franco Biondi [ctb, cph]
Maintainer Christian Zang <christian.zang@wzw.tum.de>
Repository CRAN
Date/Publication 2020-10-08 13:50:02 UTC

1
2 dcc

R topics documented:
dcc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
dlm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
exclude_from . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
g_test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
muc_clim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
muc_fake . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
muc_spruce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
norw015 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
norway_prec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
norway_temp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
rt_prec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
rt_spruce . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
rt_temp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
seascorr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
skills . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
spai020 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
spain_prec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
spain_temp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
tc_design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
traceplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
treeclim-modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
treeclim-shifters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Index 23

dcc Response and correlation function analysis

Description
This function calculates (potentially moving or evolving) 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",
dynamic = "static",
moving,
win_size = 25,
win_offset = 1,
dcc 3

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 functions),
or a single data.frame or matrix in 13-column format (see below), or a (po-
tentially named) list of one or several of the latter.
selection either a numeric vector, a modifier, or a chain of modifiers specifying the pa-
rameter selection for the model (see Details).
method character string specifying the calculation method. Possible values are “re-
sponse” and “correlation”. Partial strings are ok.
dynamic character; should the analyis be carried out in a static, moving, or evolving
fashion. One of c("static","moving","evolving"). Defaults to "static".
Partial strings are ok.
moving deprecated, use dynamic instead.
win_size integer giving the window size for each recalculation in years for a moving anal-
ysis, and the initial window size for an evolving analysis.
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 consid-
ered for analysis. Defaults to the maximum possible interval.
var_names character vector with variable names. Defaults to corresponding column names
of parameter climate if given as data.frame, or its names if given as list.
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.

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 re-
sponse and correlation functions in a similar fashion as described in the above mentioned paper.
4 dcc

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 corre-
sponding 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 (potentially named) list of
one or several of the latter described data.frame or matrices. If named list is provided, potentially
provided variable names through argument var_names are ignored. 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:

• simple selections: as an example -6:9 selects from all climate variables all months from pre-
vious 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. Months from the previous year and the year before that can be selected using
treeclim-shifters like ..(6) to refer to July of the year before the previous year.
• using modifiers: More complex parameter selections can be obtained by the modifiers provided
in treeclim: .range, .mean, and .sum. These modifiers can also be chained to create complex
selections. See treeclim-modifiers for details.

For the exclusion of months, the convenience function exclude_from (or short exfr) is provided.
1000 bootstrap samples are taken from the original distributions of climate and tree-ring data, ei-
ther using the stationary bootstrap (Politis and Romano 1994, boot = "stationary") or classical
bootstrap (DENDROCLIM2002-style, boot = "std"). The stationary bootstrap mimics the station-
ary 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. Con-
sequently, 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 pre-
dictor 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 decompo-
sition, 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.
dcc 5

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:

call the call made to function ’dcc’


coef the 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 (element ’coef’), upper and lower confidence interval (ele-
ments ’ci_upper’ and ’ci_lower’), and significance flags (element ’significant’)
design the design matrix on which this call to ’dcc’ operates
truncated the input data truncated to the common timespan or the specified timespan
original the original input data, with the climate data being recast into a single data.frame

Author(s)
Christian Zang; the original MATLAB code for exact bootstrapping was written by Dave Meko

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 Ency-
clopedia 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 Nonpara-
metric 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
## Not run:
dc_resp <- dcc(muc_spruce, muc_clim)

## End(Not run)
6 dlm

dlm Dendro-flavoured linear model

Description

This is a wrapper around lm for working with the same data structures and modifiers as dcc does.

Usage

dlm(
chrono,
climate,
selection,
timespan = NULL,
var_names = NULL,
param_names = NULL,
intercept = TRUE,
scale = FALSE
)

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 functions),
or a single data.frame or matrix in 13-column format (see below), or a (po-
tentially named) list of one or several of the latter.
selection either a numeric vector, a modifier, or a chain of modifiers specifying the pa-
rameter selection for the model (see Details).
timespan integer vector of length 2 specifying the time interval (in years) to be consid-
ered for analysis. Defaults to the maximum possible interval.
var_names character vector with variable names. Defaults to corresponding column names
of parameter climate if given as data.frame, or its names if given as list.
param_names character vector with parameter names. Defaults to auto-generated (poten-
tially compound) names.
intercept logical: should intercept be included in model?
scale logical: should data be scaled prior to computing model? If TRUE, intercept
will be set to FALSE.
dlm 7

Details

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 corre-
sponding 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 (potentially named) list of
one or several of the latter described data.frame or matrices. If named list is provided, potentially
provided variable names through argument var_names are ignored. 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.
In ’dlm’, there is no default parameter selection, in contrast to ’dcc’. Parameters can be selected
with the ’selection’ parameter in two different ways:

• simple selections: as an example -6:9 selects from all climate variables all months from pre-
vious 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. Months from the previous year and the year before that can be selected using
treeclim-shifters like ..(6) to refer to July of the year before the previous year.
• using modifiers: More complex parameter selections can be obtained by the modifiers provided
in treeclim: .range, .mean, and .sum. These modifiers can also be chained to create complex
selections. See treeclim-modifiers for details.

For the exclusion of months, the convenience function exclude_from (or short exfr) is provided.
With ’dlm’ one would usually try to keep the number of predictors low.
For pretty output of the resulting linear model, parameters can be renamed, to e.g. reflect the season
they represent.

Value

’dlm’ returns an ’object’ of class ’"tc_dlm"’, which is a superclass of ’lm’. Additional elements to
what is included in standard ’lm’ objects:

call_dlm the call made to function ’dlm’


design the design matrix on which this call to ’dlm’ operates
truncated the input data truncated to the common timespan or the specified timespan
original the original input data, with the climate data being recast into a single data.frame

Author(s)

Christian Zang
8 exclude_from

Examples
dlm1 <- dlm(rt_spruce, rt_prec, .sum(6:8), param_names = "summer_prec")
summary(dlm1)

dlm2 <- dlm(rt_spruce, list(rt_prec, rt_temp),


.sum(6:8, "prec") + .mean(6:8, "temp"), var_names = c("prec", "temp"),
param_names = c("summer_prec", "summer_temp"))
summary(dlm2)
anova(dlm1, dlm2)

exclude_from Exclude months from analysis

Description
Single months or ranges of months can be excluded from analysis. This is helpful for e.g. excluding
winter months without cambial activity.

Usage
exclude_from(month, exclude = NULL)

exfr(month, exclude = NULL)

Arguments
month range of numeric month ids
exclude range or set of months to exclude

Details
These convenience function is provided for the exclusion of months. E.g., .range(exclude_from(-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.

Value
a reduced set of numeric month ids

See Also
link{.range}, link{.mean}, link{.sum}

Examples
exfr(-5:10, -10:3)
g_test 9

g_test Gershunov test for spurious low-frequency modulations

Description

This function provides a test to decide whether low-frequency modulations in the relationship
between climate and tree-growth are significantly stronger or weaker than could be expected by
chance.

Usage

g_test(x, boot = FALSE, sb = TRUE)

Arguments

x an object of class ’"tc_dcc"’ as returned from a call to dcc with moving correla-
tions enabled
boot logical shall the individual correlations be bootstrapped? (see details)
sb logical shall a status bar be drawn?

Details

This function is a multivariate extension of the test for spurious low-frequency modulations for
moving correlations of time series as proposed by Gershunov et al. (2001). In short, 1000 simula-
tions of random data sets are generated, where the climate data is simulated as Gaussian noise, and
the tree-data as linear combinations of the climate parameters using the original coefficients of the
correlation function, and an error component with a variance equal to the variance unexplained by
the individual parameters.
For each iteration, a moving correlation function is calculated with exactly the same settings as
the original model. The standard deviation over the individual windows for each parameter is then
compared to the bootstrapped distribution of the standard deviation of the simulated data to test for
significantly higher or lower low-frequency modulations.

Value

a data.frame with p values for the testing the null hypothesis that the low-frequency modulation
of the correlations of the variables with tree-growth can be considered as noise.

References

Gershunov, A., N. Schneider, and T. Barnett. 2001. Low-frequency modulation of the ENSO-Indian
Monsoon rainfall relationship: Signal or noise? Journal of Climate 14:2486-2492.
10 muc_fake

Examples
## Not run:
dc_cor <- dcc(muc_spruce, muc_clim, 3:9, method = "cor", moving = TRUE)
g_test(dc_cor)

## End(Not run)

muc_clim Monthly Mean Temperature and Total Precipitation for Forstenrieder


Park, Munich

Description
This dataset gives the monthly mean temperature and total precipitation at Forstenrieder Park, Mu-
nich, Bavaria, Germany.

Usage
data(muc_clim)

Format
A data.frame containing four columns with year, month, temperature and precipitation.

Source
Zang C, Pretzsch H, Rothe A (2012) Size-dependent responses to summer drought in Scots pine,
Norway spruce and common oak. Trees - Structure and Function, 26, 557-569.

muc_fake Modeled Tree-Ring Chronology of a Spruce Population near Munich

Description
This dataset gives the modelled tree-ring widths for Picea abies at Forstenrieder Park, Munich,
Bavaria, Germany. Tree growth was modeled as a response of low temperatures in previous and
current July and August, high temperatures in current February and March, and high precipitation
amounts in current July and August.

Usage
data(muc_fake)

Format
A data.frame containing tree-ring indices and replication depth with respective years as rownames.
muc_spruce 11

Source
Zang C, Pretzsch H, Rothe A (2012) Size-dependent responses to summer drought in Scots pine,
Norway spruce and common oak. Trees - Structure and Function, 26, 557-569.

muc_spruce Tree-Ring Chronology of a Spruce Population near Munich

Description
This dataset gives the tree-ring indices for Picea abies at Forstenrieder Park, Munich, Bavaria, Ger-
many. The chronology represents 20 cores from 10 trees. The series were read in using read.rwl
from package dplR, detrended using a 60a spline with 50% frequency cutoff (function detrend),
and averaged to a chronology using a robust mean chron.

Usage
data(muc_spruce)

Format
A data.frame containing tree-ring indices and replication depth with respective years as rownames.

Source
Zang C, Pretzsch H, Rothe A (2012) Size-dependent responses to summer drought in Scots pine,
Norway spruce and common oak. Trees - Structure and Function, 26, 557-569.

norw015 Tree-Ring Chronology of a Pine Population at Visdalen, Norway

Description
This dataset gives the tree-ring indices for Pinus sylvestris at a site near Visdalen, Norway. The
chronology represents 34 dated series and spans the period between 1600 and 1983. The raw mea-
surements were obtained from the ITRDB (see source), and read in, detrended with cubic splines
(frequency cutoff of 50 percent at two thirds of the series length) and averaged using read.rwl,
detrend, and chron from package dplR.

Usage
data(norw015)

Format
A data.frame containing tree-ring indices and replication depth with respective years as rownames.
12 norway_temp

Source
Briffa K. Briffa - Visdalen - PISY - ITRDB NORW015. http://hurricane.ncdc.noaa.gov/pls/paleox/f?p=519:1:::::P1_STUDY_
Accessed 2014/07/03.

norway_prec Monthly Precipitation Sums for Norway

Description
This data set gives the monthly precipitation sums at country level for Norway in a decadal (DENDROCLIM2002-
style) format from the TYN CY 1.1 data set.

Usage
data(norway_prec)

Format
A data.frame containing thirteen columns with year and twelve months of temperature data in
degree Celsius.

Source
Mitchell TD, Carter TR, Jones PD, Hulme M, New M, et al. (2004) A comprehensive set of high-
resolution grids of monthly climate for Europe and the globe: the observed record (1901-2000) and
16 scenarios (2001-2100). Tyndall Centre for Climate Change Research Working Paper 55, 25.

norway_temp Monthly Temperature Means for Norway

Description
This data set gives the monthly temperature means at country level for Norway in a decadal (DENDROCLIM2002-
style) format from the TYN CY 1.1 data set.

Usage
data(norway_temp)

Format
A data.frame containing thirteen columns with year and twelve months of temperature data in
degree Celsius.
rt_prec 13

Source
Mitchell TD, Carter TR, Jones PD, Hulme M, New M, et al. (2004) A comprehensive set of high-
resolution grids of monthly climate for Europe and the globe: the observed record (1901-2000) and
16 scenarios (2001-2100). Tyndall Centre for Climate Change Research Working Paper 55, 25.

rt_prec Monthly Precipitation Sums for Rothenburg ob der Tauber, Germany

Description
This dataset gives the monthly precipitation sum at Rothenburg ob der Tauber, Bavaria, Germany
in a decadal (DENDROCLIM2002-style) format)

Usage
data(rt_prec)

Format
A data.frame containing thirteen columns with year and twelve months of precipitation data in
mm rainfall.

Source
Zang C, Rothe A, Weis W, Pretzsch H (2011) Zur Baumarteneignung bei Klimawandel: Ableitung
der Trockenstress-Anfaelligkeit wichtiger Waldbaumarten aus Jahrringbreiten. Allgemeine Forst-
und Jagdzeitung, 182, 98-112.

rt_spruce Tree-Ring Chronology of a Spruce Population at Rothenburg ob der


Tauber

Description
This dataset gives the tree-ring indices for Picea abies at Rothenburg ob der Tauber, Bavaria, Ger-
many. The chronology represents 20 cores from 10 trees. The series were read in using read.rwl
from package dplR, detrended using a 60a spline with 50% frequency cutoff (function detrend),
and averaged to a chronology using a robust mean chron.

Usage
data(rt_spruce)

Format
A data.frame containing tree-ring indices and replication depth with respective years as rownames.
14 seascorr

Source
Zang C, Rothe A, Weis W, Pretzsch H (2011) Zur Baumarteneignung bei Klimawandel: Ableitung
der Trockenstress-Anfaelligkeit wichtiger Waldbaumarten aus Jahrringbreiten. Allgemeine Forst-
und Jagdzeitung, 182, 98-112.

rt_temp Monthly Temperature Means for Rothenburg ob der Tauber, Germany

Description
This dataset gives the monthly temperature means at Rothenburg ob der Tauber, Bavaria, Germany
in a decadal (DENDROCLIM2002-style) format)

Usage
data(rt_temp)

Format
A data.frame containing thirteen columns with year and twelve months of temperature data in
degree Celsius.

Source
Zang C, Rothe A, Weis W, Pretzsch H (2011) Zur Baumarteneignung bei Klimawandel: Ableitung
der Trockenstress-Anfaelligkeit wichtiger Waldbaumarten aus Jahrringbreiten. Allgemeine Forst-
und Jagdzeitung, 182, 98-112.

seascorr Seasonal (partial) correlation analysis

Description
Calculate seasonal correlation with primary and secondary climate variables and tree-ring data,
similar to the seascorr function for MATLAB.

Usage
seascorr(
chrono,
climate,
var_names = NULL,
timespan = NULL,
complete = 9,
season_lengths = c(1, 3, 6),
seascorr 15

primary = 1,
secondary = 2,
ci = 0.05
)

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 functions),
or a single data.frame or matrix in 13-column format (see below), or a (po-
tentially named) list of one or several of the latter.
var_names character vector with variable names. Defaults to corresponding column names
of parameter climate if given as data.frame, or its names if given as list.
timespan integer vector of length 2 specifying the time interval (in years) to be consid-
ered for analysis. Defaults to the maximum possible interval.
complete integer scalar, month when tree-ring growth is expected to have finished.
season_lengths numeric vector giving the lengths of the seasons for variable grouping
primary position numeric or name character of primary climate variable
secondary position numeric or name character of secondary climate variable
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.

Details
This function mimicks the behaviour of the MATLAB function seascorr (Meko et al. 2011), which
calculates partial correlations of tree-ring data with a primary and a secondary climatic variable for
seasons of different lengths.
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 corre-
sponding 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.
The ‘complete‘ parameter specifies the months of the current year in which tree-growth is assumed
to finish. This month marks the last month of the first season, and starting from here, 14 different
seasons are computed for each specified season length in one-month steps. E.g., for a starting value
of 9 (current September) and season length of 3 months, the first season comprises current July to
current September, the second season comprises current June to current August, and the last season
16 seascorr

comprises previous June to previous August. This results in 14 seasons for a given season length.
An arbitrary number of season lengths can be specified.
The choice for primary vs. secondary variable can be made either via numeric selection (the integer
value 1 stands for the first variable in the supplied climate data set), or by name ("temp", when one
of the variables is named "temp"). The correlation of the primary variable with tree-growth is com-
puted as the simple (Pearson) correlation coefficient, while the influence of the secondary variable
on tree-growth is computed with the influence of the primary variable on tree-growth removed.
Like in the original seascorr program, the significance of each (partial) correlation is evaluated using
exact bootstrapping by circulant embedding of the tree-ring data (Percival \& Constantine, 2006).

Value

’seascorr’ returns an ’object’ of class ’"tc_seascorr"’.


The ’plot’ function is used to obtain a plot of the results.
An object of class ’"tc_seascorr"’ is a list containing at least the following components:

call the call made to ’seascorr’


seasons a list of length n, where n is the number of season lengths provided; each list
element consists of a data.frame with end month, correlation coefficient and
significance flag
truncated the input data truncated to the common timespan or the specified timespan
original the original input data, with the climate data being recast into a single data.frame

Author(s)

Christian Zang; the procedure incl. exact bootstrapping was implemented first by Dave Meko in
MATLAB

References

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-
1241.
Percival DB, Constantine WLB (2006) Exact simulation of Gaussian Time Series from Nonpara-
metric Spectral Estimates with Application to Bootstrapping. Statistics and Computing 16:25-35

Examples
sc <- seascorr(muc_fake, muc_clim)
sc
plot(sc)
skills 17

skills Evaluate reconstruction skills using split-calibration

Description
This function allows to evaluate the reconstruction skills for a given proxy time series in split-
calibration approach.

Usage
skills(
object,
target = NULL,
model = "ols",
calibration = "50%",
timespan = NULL
)

Arguments
object an object of class "tc_dcc", "tc_dlm", or "tc_seascorr"
target a treeclim selection modifier specifying the climate target to be reconstructed,
see below for details
model one of "ols" or "rma"
calibration which part of the data shall be used as calibration subset? Given as either a range
of years, an integer corresponding to the first or last number of observations, or
a percentage as character string corresponding to the part of the data set to be
used as calibration subset.
timespan timespan to be used to truncate the data

Details
The result of a call to dcc, dlm, or seascorr can be used as object for the function. The required
data is then taken from this object and no further processing of the tree and climate variables has
to be done for by the user. This reflects the flow of analysis, where first general climate/growth
relations are explored, and then the strongest ones are deployed for reconstruction purposes.
target is an aggregation modifier (one of .mean, .sum, and .range). The user should be aware
of the fact that in case the aggregation modifier evaluates to more than one variable (e.g., summer
means for both temperature and precipiation), a warning message is issued, and only the first vari-
able is taken into consideration for evaluating the reconstruction skills. If not specified, the selection
from the original call to dcc, seascorr, or dlm is used.
The type of regression model (ordinary least squares or errors-in-variables via reduced major axis
regression) can be selected.
The part of the data to be used as a calibration subset can be specified in three different ways: 1)
as a range of years, these are then taken as calibration period; 2) as a single integer, if positive, this
18 skills

number of observations at the recent end of the data set is taken as calibration set, if negative, this
number of oldest observations is taken; and 3) as a character string giving a percentage of values,
e.g., "-40%" would select the 40% oldest observations, while "55%" would select the 55% most
recent ones.
The relationship between climate and tree-ring data is evaluated for the calibration period and the
complete data set. Frequently used verification statistics are computed: reduction of error (RE),
coefficient of efficiency (CE), and the Durban-Watson statistic (DW) (Cook et al. 1994, Durbin and
Watson, 1951).

Value
’skills’ returns an ’object’ of class ’"tc_skills"’.
An object of class ’"tc_skills"’ is a list containing at least the following components:

call the call made to function ’skills’


target the target used for reconstruction
r.cal the coefficient of correlation for the calibration timespan
r.full the coefficient of correlation for the complete data set
coef.cal regression coefficients for the calibration model
coef.full regression coefficients for the full model
p.cal significance for the calibration model
p.full significance for the full model
RE reduction of error statistic
CE coefficient of efficiency statistic
DW Durbin-Watson statistic
RMSE The root mean squared error for the prediction interval
cal.model the complete calibration model (an object of class ’lmodel2’)
full.mode the complete full model (an object of class ’lmodel2’)

References
Cook E, Briffa K, Jones P (1994) Spatial regression methods in dendroclimatology: A review and
comparison of two techniques. International Journal of Climatology, 14, 379-402.
Durbin, J, Watson, GS (1951) Testing for serial correlation in least squares regression. Biometrika
38:159-78.

Examples
## Not run:
dc <- dcc(muc_fake, muc_clim, .mean(6:9, "temp") + .sum(6:9,
"prec"))
sk <- skills(dc)
sk
plot(sk)

## End(Not run)
spai020 19

spai020 Tree-Ring Chronology of a Pine Population at Penota, Spain

Description
This dataset gives the tree-ring indices for Pinus sylvestris at a site near Penota, Spain. The chronol-
ogy represents 18 dated series and spans the period between 1763 and 1991. The chronology was
obtained from the ITRDB (see source), and read in using read.crn from package dplR.

Usage
data(spai020)

Format
A data.frame containing tree-ring indices and replication depth with respective years as rownames.

Source
Fernandez-Cancio A, Genova Fuster M: Fernandez-Cancio - Penota - PISY - ITRDB SPAI020,
http://hurricane.ncdc.noaa.gov/pls/paleox/f?p=519:1:::::P1_STUDY_ID:3255, accessed 2014/07/03.

spain_prec Monthly Precipitation Sums for Spain

Description
This data set gives the monthly precipitation sums at country level for Spain in a decadal (DENDROCLIM2002-
style) format from the TYN CY 1.1 data set.

Usage
data(spain_prec)

Format
A data.frame containing thirteen columns with year and twelve months of temperature data in
degree Celsius.

Source
Mitchell TD, Carter TR, Jones PD, Hulme M, New M, et al. (2004) A comprehensive set of high-
resolution grids of monthly climate for Europe and the globe: the observed record (1901-2000) and
16 scenarios (2001-2100). Tyndall Centre for Climate Change Research Working Paper 55, 25.
20 tc_design

spain_temp Monthly Temperature Means for Spain

Description
This data set gives the monthly temperature means at country level for Spain in a decadal (DENDROCLIM2002-
style) format from the TYN CY 1.1 data set.

Usage
data(spain_temp)

Format
A data.frame containing thirteen columns with year and twelve months of temperature data in
degree Celsius.

Source
Mitchell TD, Carter TR, Jones PD, Hulme M, New M, et al. (2004) A comprehensive set of high-
resolution grids of monthly climate for Europe and the globe: the observed record (1901-2000) and
16 scenarios (2001-2100). Tyndall Centre for Climate Change Research Working Paper 55, 25.

tc_design Deparse list structure from month specification and return parameter
set

Description
Deparse list structure from month specification into single calls, call an aggregating function to
collect the data, and return a parameter set for calibration. In general, the months must be specified
as a list or nested list structure. Possible cases are: list() list(...) list(list(...)) list(list(...), list(...), ...)

Usage
tc_design(selection, climate, check_2 = TRUE)

Arguments
selection the list structure to specify the month selection
climate the climate data as returned by make_pmat
check_2 should there be a check for less than 2 variables in the design matrix?

Value
a data.frame
traceplot 21

traceplot Trace the temporal development of response or correlation coefficients

Description
This is a plotting function that takes the output from a dynamic ("moving" or "evolving") dcc run
to trace the temporal development of all or selected variables. The variables can be selected using
their name, partial matching is allowed.

Usage
traceplot(x, variables = NULL, facet = FALSE)

Arguments
x an object returned from a call to dcc with parameter dynamic set to either "mov-
ing" or "evolving".
variables a character vector of variable names to be plotted; if NULL (default), all vari-
ables will be traced
facet logical: shall the plot be splitted into facets for different variables?

Value
an object of class "gg".

Examples
## Not run:
dc_resp <- dcc(muc_spruce, muc_clim, 4:9, dynamic = "evolving")
traceplot(dc_resp, c("prec.curr.may", "prec.curr.jun"))

## End(Not run)

treeclim-modifiers Modifiers for climate parameter selection

Description
These modifiers are used to select specific months from specific climate parameters, and potentially
transform the selections into their respective sums or means. The modifiers can be chained together
using ’+’. .range corresponds to using all specified months separately, 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).
22 treeclim-shifters

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.

Usage
.range(.months = NULL, .variables = NULL)

.mean(.months = NULL, .variables = NULL)

.sum(.months = NULL, .variables = NULL)

Arguments
.months numeric identifiers for the months (-1 for previous January until 12 for current
December, with -6 for previous June, etc.)
.variables names of the variables the modifier shall be applied to

Examples
## Not run:
my_calib <- dcc(rt_spruce, list(prec = rt_prec, temp = rt_temp),
.range(4:9, "temp") + .mean(-5:-9, "temp") + .sum(3:10, "prec"))
plot(my_calib)

## End(Not run)

treeclim-shifters Shift months one or two years back

Description
These functions are used to specify months from previous years for the design matrix. .(1) is the
same as -1, and specifies previous year’s January, whereas ..(1) signifies January of the year prior
to the last year.

Usage
.(x)

..(x)

Arguments
x numeric identifier (of length 1) for the months (1 for January, ..., 12 for Decem-
ber)
Index

∗ datasets muc_spruce, 11
muc_clim, 10
muc_fake, 10 norw015, 11
muc_spruce, 11 norway_prec, 12
norw015, 11 norway_temp, 12
norway_prec, 12
norway_temp, 12 read.crn, 19
rt_prec, 13 read.rwl, 11, 13
rt_spruce, 13 rt_prec, 13
rt_temp, 14 rt_spruce, 13
spai020, 19 rt_temp, 14
spain_prec, 19
seascorr, 14, 17
spain_temp, 20
skills, 17
∗ manip
spai020, 19
exclude_from, 8
spain_prec, 19
∗ test
spain_temp, 20
g_test, 9
. (treeclim-shifters), 22 tc_design, 20
.mean, 17 traceplot, 21
.mean (treeclim-modifiers), 21 treeclim-modifiers, 4, 7, 21
.range, 17 treeclim-shifters, 4, 7, 22
.range (treeclim-modifiers), 21
.sum, 17
.sum (treeclim-modifiers), 21

chron, 11, 13

dcc, 2, 6, 9, 17
detrend, 11, 13
dlm, 6, 17

exclude_from, 4, 7, 8
exfr, 4, 7
exfr (exclude_from), 8

g_test, 9

lm, 6

muc_clim, 10
muc_fake, 10

23

You might also like