sync.trend | R Documentation |
The function calculates temporal trends of spatial synchrony from a data.frame
with tree-ring width chronologies using a moving window as described in Shestakova et al. (2016). This method splits the time variable (varTime
) in 30 years windows plus a 5 years lag, and in each window the within- or between-group level (varGroup
) synchronies are calculated. The function can also be used to find synchrony with similar time series data.frame
from other fields.
sync.trend (formula, varTime="", varGroup="", data, window = 30, lag = 5, null.mod = TRUE, selection.method = c("AIC", "AICc", "BIC"), all.mod = FALSE, homoscedastic = TRUE, between.group = FALSE)
formula |
a |
varTime |
a |
varGroup |
a |
data |
a |
window |
an |
lag |
an |
null.mod |
a |
selection.method |
a |
all.mod |
a |
homoscedastic |
a |
between.group |
a |
The function fits by default ("null.mod=T"
) the null model for general synchrony (broad evaluation, mBE) for a specified time window size and lag. If "null.mod=F"
the function calculates homoscedastic
or heteroscedastic
versions of variance-covariance (VCOV) mixed models available (mBE, mNE, mCS, mUN, mHeNE, mHeCS, mHeUN; dendro.varcov
) for each time window size and lag selected. In each window the best model is chosen based on the minimum information criterion selected between "AIC", "AICc" or "BIC".
When no selection.method
is defined by default AIC is used.
If "all.mod=T"
the functions fits the homoscedastic and heteroscedastic versions of the 7 models (this is a higly time consuming process).
The function returns a data.frame
containing the following components:
for null.mod
TRUE
:
a_Group |
a column representing the within-group synchrony (mBE). |
SE |
standard error of each observation. |
Windlag |
a column representing the lag of the window used to split the time variable. A 0 value means that lag is 0, and then the defined time window starts from minimun varTime value. |
varTime |
a column representing the |
for null.mod
FALSE
:
Modname |
a column indicating the best model fit and the information criterion used. |
GroupName |
a column indicating levels of the |
a_Group |
a column indicating within-group synchrony for each |
a_betw_Grp |
a column indicating between-group synchrony for each |
SE |
standard error of each observation. |
Windlag |
a column representing the lag of the window used to split the time variable. A 0 value means that lag is 0, and then the defined time window starts from minimun varTime value. |
varTime |
a column representing the |
Josu G. Alday, Tatiana A. Shestakova, Victor Resco de Dios, Jordi Voltas
Shestakova, T.A., Aguilera, M., Ferrio, J.P., Gutierrez, E. & Voltas, J. (2014). Unravelling spatiotemporal tree-ring signals in Mediterranean oaks: a variance-covariance modelling approach of carbon and oxygen isotope ratios. Tree Physiology 34: 819-838.
Shestakova, T.A., Gutierrez, E., Kirdyanov, A.V., Camarero, J.J., Genova, M., Knorre, A.A., Linares, J.C., Resco de Dios, V., Sanchez-Salguero, R. & Voltas, J. (2016). Forests synchronize their growth in contrasting Eurasian regions in response to climate warming. Proceedings of the National Academy of Sciences of the United States of America 113: 662-667.
## Calculate temporal trends of spatial synchrony for conifersIP data: data(conifersIP) ##Fit the null.model temporal trend (mBE) #using taxonomic grouping criteria (i.e. Species) mBE.trend <- sync.trend(TRW ~ Code, varTime = "Year", varGroup = "Species", data = conifersIP, null.mod = TRUE, window = 30, lag = 5) mBE.trend# it returns a data.frame ## Not run: ##Fit homoscedastic within-group trends (mBE, mNE, mCS, mUN) # using geographic grouping criteria (i.e. Region) geo.trend <- sync.trend(TRW ~ Code, varTime = "Year", varGroup = "Region", data = conifersIP, window = 30, lag = 5, null.mod = FALSE, homoscedastic = TRUE) geo.trend#a data.frame with varGroup syncrony for each time window. ##Fit heteroscedastic between-group trends (mBE, mHeNE, mHeCS, mHeUN) #using geographic grouping criteria (i.e. Region) and BIC geo.het.trend <- sync.trend(TRW ~ Code, varTime = "Year", varGroup = "Region", data = conifersIP, window = 30, lag = 5, null.mod = FALSE, selection.method = c("BIC"), homoscedastic = FALSE, between.group = TRUE) geo.het.trend ##Fit homoscedastic and heterocedastic within-group trends # using taxonomic grouping criteria (i.e. Species) and BIC geo.tot.trend <- sync.trend(TRW ~ Code, varTime = "Year", varGroup = "Species", data = conifersIP, window = 30, lag = 5, selection.method = c("BIC"), all.mod = TRUE) geo.tot.trend ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.