DOI: 10.21950/iyfsjb
title: Introducing climwin package of R to dendrochronologists

description: &lt;p&gt;R scripts showing how to use climwin package with tree-ring width and anatomy chronologies. The databases needed to use the scripts are included.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
-------------------------- &lt;p&gt;&lt;/p&gt;
&lt;p&gt;FILES &lt;/p&gt;
&lt;p&gt;--------------------------&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;1. climwin with dendro and anatomy.R&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;R script in which climwin is used to study the growth/anatomy-climate relationships of 5 species with weekly time resolution.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. climwin with the river flow.R&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;R script in which climwin is used to study the growth-river flows relationships of 2 sites with monthly time resolution. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;3. Pinus sylvestris model.R&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;R script in which climwin is used to fit a multiple linear regression.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;4. RingWidths.csv&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Database of detrended growths and anatomical variables needed to run the R scripts. &lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Abbreviations:&lt;/p&gt;
&lt;p&gt;LA - lumen area &lt;/p&gt;
&lt;p&gt;CWT - cell wall thickness&lt;/p&gt;
&lt;p&gt;ew - earlywood&lt;/p&gt;
&lt;p&gt;lw - latewood&lt;/p&gt;
&lt;p&gt;Ps - Pinus sylvestris (Corbalán site)&lt;/p&gt;
&lt;p&gt;Aa - Abies alba (Paco Ezpela site)&lt;/p&gt;
&lt;p&gt;VA1 - Valdelinares (Pinus uncinata)&lt;/p&gt;
&lt;p&gt;AL - Alcalá de la Selva (Pinus sylvestris)&lt;/p&gt;
&lt;p&gt;CO - Olmedilla (Pinus nigra)&lt;/p&gt;
&lt;p&gt;AC - Alto de Cabra (Pinus pinaster)&lt;/p&gt;
&lt;p&gt;VH - Valbona (Pinus halepensis)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;5. climate.rds&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Database of climate needed to run the R scripts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Abbreviations:&lt;/p&gt;
&lt;p&gt;T - Temperature&lt;/p&gt;
&lt;p&gt;Tmax - Maximum temperature&lt;/p&gt;
&lt;p&gt;Tmin - Minimum temperature&lt;/p&gt;
&lt;p&gt;P - Precipitation&lt;/p&gt;
&lt;p&gt;spei - Standardized Evapotranspiration Precipitation Index using a range of time scales (1, 3, 6, 9, 12, 24, 36 and 48 months) over which water deficits and surplus accumulate are considered.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;6. Fraxinus.csv&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Database of detrended growths of Fraxinus needed to run the R scripts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;7. River flow.csv&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Database of river flow needed to run the R scripts.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;8. readme.txt&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;txt file explaining the details of the data.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
description: -------------------------- 
METHODOLOGY 
-------------------------- 

We aim to identify the most likely climate variables driving the growth and wood anatomy 
of the species using climwin package.

We used the weekly resolved climate data and a randomization technique to find, for each climate variable, the most relevant period of the year in which climate was most related to growth according to climwin. To identify the most likely climate predictors of the growth and wood anatomy features and the most relevant time window (the most influential period of the year for individual climate variables), we fitted simple linear regressions with the growth/anatomy variables as the response variables and the climate variables as predictors. The mean of each factor in each time window considered was used as the aggregate statistics. For each factor all possible window lengths (periods of year) at weekly resolution (but monthly resolution for the flow river) was calculated and the one with the lowest ΔAICc compared to the null model (i.e., including the intercept only) was selected. Finally, randomization tests were calculated using 1000 repetitions to calculate pΔAICc (the likelihood that a climatic signal is real). October 1 of the previous year was established as the threshold for the beginning of the windows and November 31 of the year of growth as the limit for the end of the windows. A minimum length of two weeks was pre-defined. 

A multiple linear regression were fitted using P. sylvestris pine lumen area chronology, without distinguishing between earlywood and latewood, as the response variable and including the climate variables found to be statistically significant. For building the model with climwin we followed this procedure: (i) among the simple linear models calculated with climwin for the response variable, the model with the lowest ∆AICc was selected; (ii) using this model as baseline model, we introduced the rest of climatic variables one by one in order to fit all possible two-factor models, obtaining for each model ∆AICc, climate windows and p∆AICc; and (iii) the models with p∆AICc &lt; 0.05 were selected. Finally, only a model with two climate variables met this condition. If more significant models with different climatic variables had been found, the whole process would have to be repeated including the model with two climatic factors with lower ∆AICc in the baseline model. Multicollinearity was avoided by controlling the variance inflation factor (VIF).