Telfers change index is designed to assess the relative change in range size of species between two time periods (Telfer et al 2002). This function can take multiple time periods and will complete all pairwise comparisons.
Arguments
- taxa
A character vector of taxon names
- site
A character vector of site names
- time_period
A numeric vector of user defined time periods, or a date vector
- minSite
The minimum number of sites occupied in the first time period in order for a trend to be calculated for a taxon.
- useIterations
A logical variable indicating whether iterations should be used. Iterations are used to account for increased variation in the logit proportions close to zero and one (see Telfer et al 2002). Default is
TRUE
- iterations
If
useIterations
isTRUE
, then this parameter indicates the number of iterations to be used. In Telfer et al 2002 the number of iterations used were 7 and 8 for the two datasets for which it was applied. The defualt here is 10.
References
Telfer, M.G., Preston, C.D., & Rothery, P. (2002) A general method for measuring relative change in range size from biological atlas data. Biological Conservation, 107, 99-109.
Examples
# Create fake data
SS <- 5000 # number of observations
taxa <- sample(letters, SS, replace = TRUE)
site <- sample(paste('A', 1:20, sep = ''), SS, replace = TRUE)
time_period <- sample(1:3, SS, replace = TRUE)
TelferResult <- telfer(taxa, site, time_period)
#> Warning: 3500 out of 5000 observations will be removed as duplicates
head(TelferResult)
#> taxa Nsite_1.x Nsite_2.x Telfer_1_2 Nsite_1.y Nsite_3.x Telfer_1_3 Nsite_2.y
#> 1 a 19 19 -0.3496937 19 20 1.1349254 19
#> 2 b 19 20 1.0791037 19 18 -1.0236982 20
#> 3 c 19 19 -0.3496937 19 20 1.1349254 19
#> 4 d 18 17 -1.3360467 18 20 1.3049751 17
#> 5 e 20 20 0.6735143 20 18 -1.5819806 20
#> 6 f 19 20 1.0791037 19 19 -0.3132701 20
#> Nsite_3.y Telfer_2_3
#> 1 20 1.0550502
#> 2 18 -1.4056967
#> 3 20 1.0550502
#> 4 20 1.1993588
#> 5 18 -1.4056967
#> 6 19 -0.6252982