TECHNICAL NOTENew features in the dendroTools R package: Bootstrapped and partial correlation coefficients for monthly and daily climate data
Introduction
The R package dendroTools provides functions that enable dendroclimatological analysis using climate data on a daily scale. While alternative software such as CLIMTREG (Beck et al., 2013) and DendroCorr (Hulist et al., 2016) is available, the advantages of dendroTools are its implementation in the very popular R environment (R Core Team, 2019) and open source R code, which can also be modified to meet user specific needs. Using climate data on daily scales provides more flexible analysis of climate-growth relationships, such as climate reconstructions of periods not bounded by months and changes in climate signal patterns over time. Jevšenak (2019) compared climate-proxy correlations on a European-wide tree-ring network and calculated the difference between the daily and monthly approach. Day-wise aggregated correlations were on average higher by 0.071. In comparison to temperature data, the benefit of using daily data is greater for precipitation data.
The functionality of the daily analysis is based on a running window that simultaneously aggregates daily data and calculates correlations between proxy and aggregated daily data. The primary function of dendroTools is daily_response(), the basic functionality of which has already been presented by Jevšenak and Levanič (2018). Recently, new features were added to the package that extend the basic functionality and offer a variety of methods that could be useful for researchers from the dendroclimatological community and beyond.
The most important novelty are bootstrapped correlations, which enable the calculation of confidence intervals of correlation coefficients or (adjusted) explained variance. Partial correlations are commonly applied in dendroclimatology due to correlations between temperature and precipitation data (e.g. Marquardt et al., 2019; Zhang et al., 2014). A new function is available to effectively organize the required daily data format. Developed generic S3 plotting and summary functions (Chambers, 2014) provide effective methods for the interpretation of the calculated correlations. Finally, all functions that were primarily developed for daily data were also modified and now enable analyses using monthly data as well.
The purpose of this article is therefore to demonstrate the new features and functions in dendroTools, namely 1) data transformation, 2) bootstrapping, 3) partial correlation coefficients and 4) functions for analysis using monthly data. All examples presented below are coded in the R script article_script.R, which is given as supplementary material in executable format.
Section snippets
Installation and implementation
In this article, I refer to dendroTools v1.0.7, which is available under GNU General Public License, Version 3. The dendroTools R package is available from CRAN repository and can be installed with the standard command > install.packages(“dendroTools”). Potential users are also invited to explore the current version under development, which is available from GitHub and can be installed with the command > install_github("jernejjevsenak/dendroTools"). To run the newest dendroTools, R version 3.4
Example data
The functionality of the new features in dendroTools is demonstrated using the freely available swit272 dataset (Bigler and Clalüna, 2012), which was downloaded from the International Tree-Ring Database (Zhao et al., 2019) and included in the dendroTools R package to make the examples presented here executable. The swit272 dataset is a standardized tree-ring width chronology of European larch (Larix decidua) from a high elevation site (2100 m) in southern Switzerland. The daily climate datasets
Transformation and quick preview daily data
Data preparation is an important step before analysing the relationships between daily data and a tree-ring proxy. The required format for daily data is a data frame with 366 columns and any number of rows, each representing one year, which is indicated as a row name. The common format of daily data provided by many online sources is a table with two columns, where the first column represents the date and the second is the value of the climate variable. To quickly transform such a format into a
Partial correlations from daily data
A partial correlation coefficient describes the strength of the linear relationship between two variables, holding constant a number of other variables (Freund et al., 2010). It is often used in dendroclimatological investigations to analyse the effect of temperature on a tree-ring parameter while at the same time controlling for the precipitation effect, or vice versa. This methodology was first implemented as the MATLAB program seascorr (Meko et al., 2011) and is now also available in the
Bootstrapped correlation coefficients
The bootstrapping method is a computer-based method for assigning measures of accuracy to statistical estimates (Efron and Tibshirani, 1993). In the dendroTools R package, bootstrapping is available to estimate the confidence intervals of selected statistical metrics, i.e. correlation coefficient, explained variance or adjusted explained variance. To use bootstrap, set the argument boot as TRUE. The number of bootstrap samples is defined with the boot_n argument, while the confidence levels are
Analysis of climate-growth relationships using monthly data
Both the daily_response() and daily_response_seascor() functions also have variations that were developed to analyse climate-growth relationships using data on a monthly scale: monthly_response() and monthly_response_seascor(). The arguments in both function variations are very similar. Monthly data should be organized as a data frame with twelve columns (months), where each row represents one year. Years should be indicated as row names. Monthly data can be obtained from various online
Conclusions
Due to the advantages related to the daily data approach, many authors have decided to calculate climate-growth correlations using daily data (e.g. Kaczka et al., 2018; Nechita et al., 2019). Arguably, the most evident disadvantage of the daily_response() and daily_response_seascorr() functions is the so-called problem of multiple testing, which increases type I error. However, it must be noted that while the multiple testing problem relates to situations where numerous independent statistical
Funding
Funding for this study was provided by the Slovene Research Agency: Program and Research Group “Forest biology, ecology and technology” P4−0107 and basic research projects J4−8216 “Mortality of lowland oak forests - consequence of lowering underground water or climate change?”.
Declaration of Competing Interest
The author declare no conflicts of interest.
Acknowledgments
I acknowledge the E-OBS dataset from the EU-FP6 project UERRA (http://www.uerra.eu) and the Copernicus Climate Change Service, and the data providers in the ECA&D project (https://www.ecad.eu).
References (21)
- et al.
CLIMTREG: detecting temporal changes in climate–growth reactions – a computer program using intra-annual daily and yearly moving time intervals of variable width
Dendrochronologia
(2013) - et al.
CHAPTER 8 - multiple regression
Daily climate data reveal stronger climate-growth relationships for an extended European tree-ring network
Quat. Sci. Rev.
(2019)- et al.
dendroTools: R package for studying linear and nonlinear responses between tree-rings and daily environmental data
Dendrochronologia
(2018) - et al.
Seascorr: a MATLAB program for identifying the seasonal climate signal in an annual tree-ring time series
Computers & Geosciences
(2011) - et al.
Radial growth-based assessment of sites effects on pedunculate and greyish oak in southern Romania
Sci. Total Environ.
(2019) - et al.
NOAA/WDS Paleoclimatology - Bigler - Sils-Maria GR Blais Dal Fö - LADE - ITRDB SWIT272
(2012) Object-oriented programming, functional programming and R
Statistical Sci.
(2014)R: a language and environment for statistical computing
R Foundation for Statistical Computing
(2019)- et al.
An ensemble version of the E-OBS temperature and precipitation data sets
Geophys. Res. Lett.: Atmospheres
(2018)
Cited by (22)
Shifting potential for high-resolution climate reconstructions under global warming
2024, Quaternary Science ReviewsClimate response of a glacial relict conifer across its distribution range is invariant in space but not in time
2024, Science of the Total EnvironmentLocal site conditions reduce interspecific differences in climate sensitivity between native and non-native pines
2023, Agricultural and Forest MeteorologyIs there Chornobyl nuclear accident signature in Scots pine radial growth and its climate sensitivity?
2023, Science of the Total EnvironmentThe importance degree of weather elements in driving wildfire occurrence in mainland China
2023, Ecological Indicators