pop.decline | R Documentation |
Based on the fit of statistical models to population data, the function estimates the decline on the number of mature individuals across time, expressed in percentage.
pop.decline(
pop.size = NULL,
years = NULL,
taxa = NULL,
models = "all",
project.years = NULL,
output = "all",
by.taxon = FALSE,
parallel = FALSE,
NbeCores = 2,
show_progress = TRUE,
...
)
pop.size |
a vector, data frame or matrix containing the (estimated) number of mature individuals of species (i.e. population size). If a data frame or matrix, rows are the species and columns are the population sizes. |
years |
a vector containing the years for which the population sizes is available |
taxa |
a vector containing the name of the species in |
models |
a vector containing the names of the statistical models to be fitted to species population data |
project.years |
a vector containing the years for which the number of mature individuals should be predicted using the best candidate statistical model |
output |
a character or vector containing the desired output from the function. The options are: "predictions", "model.fit", "model.selection" and "best.model". By default, the function returns only the predictions. |
by.taxon |
logical. Should the output list be organized by the selected output options (i.e. predictions, model.fit, model.selection and best.model) for all taxa or should it contain one taxon per taxon with all selected outputs? Defaults to FALSE (list organized by outputs and not taxa). |
parallel |
a logical. Whether running should be performed in parallel. FALSE by default. |
NbeCores |
an integer. Register the number of cores for parallel execution. Two by default. |
show_progress |
logical. Whether progress informations should be displayed. TRUE by default |
... |
other parameters to be passed as arguments for functions
|
By default, the function compares the fit of six statistical models to the
population trends, namely: linear, quadratic, exponential, logistic,
generalized logistic and piece-wise. But users can use different combinations
of those models using the argument models
, according to the specificity
of their study region or groups of organism. See pop.decline.fit
for
more details and assumptions on how those models are fitted to population
data and how the candidate models are selected.
a named list
Renato A. Ferreira de Lima
IUCN 2019. Guidelines for Using the IUCN Red List Categories and Criteria. Version 14. Standards and Petitions Committee. Downloadable from: http://www.iucnredlist.org/documents/RedListGuidelines.pdf.
pop.decline.fit
## Creating vectors with the population data and time intervals
#(adapted from the IUCN 2019 workbook for Criterion A, available
#at: https://www.iucnredlist.org/resources/criterion-a)
pop = c(10000, 9050, 8250, 7500, 7200, 6950)
pop1 = c(10000, NA, 8200, NA, NA, 6000)
yrs = c(1970, 1975, 1980, 1985, 1990, 2000)
tax = c("species A", "species B")
pops = matrix(c(pop, pop1), nrow = length(tax),
dimnames = list(tax, yrs), byrow = TRUE)
## Fitting data with different models and settings
# only one species, all models (default)
pop.decline(pop, yrs)
# two species or more
pop.decline(pops)
# two species or more, less models
pop.decline(pops, models = c("linear", "quadratic"))
pop.decline(pops, models = "exponential")
# two species or more, exponential models with projections
pop.decline(pops, models = "exponential", project.years = c(1960, 2050))
pop.decline(pops, models = "exponential", project.years = c(1973, 2005))
# two species or more, different outputs
pop.decline(pops, models = "exponential", output = "model.fit")
pop.decline(pops, models = c("linear", "quadratic", "exponential"),
output = "model.selection")
## Another examples
# Few observations (warning or no model fit below 3 observations)
pop.decline(pop.size = c(10000, 8200, 6000), years = c(1970, 1985, 2000),
models = "all", project.years = 2030)
## Not run:
# Not enough observations (error)
pop.decline(pop.size = c(10000, 6000), years = c(1970, 2000))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.