sync.trend.plot {DendroSync}R Documentation

Plot temporal trends of synchrony

Description

The function creates a line chart showing temporal trends of spatial synchrony from data.frame of the type as produced by sync.trend.

Usage

sync.trend.plot (sync.trend.data)

Arguments

sync.trend.data

a data.frame of the type as produced by sync.trend.

Details

The function makes a line chart showing synchrony trends across years from a data.frame produced by sync.trend. Within- or between- group synchrony and SE are indicated for a selected time window. If synchrony is defined using using null.mod = TRUE (sync.trend) only general synchrony is ploted. If synchrony is defined using using null.mod = FALSE (sync.trend) different synchronies for each group variable (varGroup) are fitted with different colours for each stratum.

Value

Line chart

Author(s)

Josu G. Alday, Tatiana A. Shestakova, Victor Resco de Dios, Jordi Voltas

Examples

## Calculate temporal trends of 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
 sync.trend.plot(mBE.trend)# Broad evaluation synchrony linechart

## 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 synchrony for each time window.
 sync.trend.plot(geo.trend)#Selected heteroscedastic between-group trends by AIC
 
 ##Fit heteroscedastic betwen-group trends (mBE, mHeNE, mHeCS, mHeUN) 
 # using geographic grouping criteria (i.e. Region) and AICc
 geo.het.trend <- sync.trend(TRW ~ Code, varTime = "Year", varGroup = "Region", 
                    data = conifersIP, window = 30, lag = 5, null.mod = FALSE, 
                    selection.method = c("AICc"), homoscedastic = FALSE, between.group = TRUE)
 
 geo.het.trend
 sync.trend.plot(geo.het.trend)#Selected heteroscedastic between-group trends by AICc
 
 ##Fit homoscedastic and heteroscedastic 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"),
                    null.mod = F, all.mod = TRUE)
 geo.tot.trend
 #Selected homoscedastic and heteroscedastic within-group trends by BIC
 sync.trend.plot(geo.tot.trend)
 
## End(Not run)
 


[Package DendroSync version 0.1.4 Index]