snc {alien}R Documentation

Fit a model to discovery records

Description

Fit a model to a time series describing first records of alien species. If no external data is provided, the function fits the model described in Solow and Costello (2004). When external data on either \mu_t or \Pi_{st} is provided, the function fits the modified model (sampling-proxy model in the case of \Pi_{st}) as described in Buba et al (2024).

Usage

snc(
  y,
  mu = NULL,
  pi = NULL,
  data = NULL,
  init = NULL,
  growth = TRUE,
  type = "exponential",
  ...
)

Arguments

y

either a vector describing the number of discovered alien and invasive species (IAS) over a given time period, or the name (quoted or unquoted) of the corresponding column in the provided data.

mu

a formula defining the predictors for \mu_t, the annual introduction rate. Formulas should be provided in the syntax ~ x1 + x2 + ... + xn. Use ~ 1 for an intercept only model.

pi

a formula defining the predictors for \Pi_{st}, the annual probability of detection. Formulas should be provided in the syntax ~ x1 + x2 + ... + xn. Use ~ 1 for an intercept only model.

data

a data frame containing the variables in the model(s).

init

Optional. Initial values supplied to optim. Must be same length as the total number of parameters.

growth

logical. Should the population growth parameter \gamma_2 be included in the model for \Pi_{st}?. Note that values for init, if provided, need to include an initial value for the growth parameter, when growth = TRUE.

type

Define whether the mu function should be on "linear" or "exponential" scale. Defaults to "exponential".

...

Further arguments passed to optim.

Details

This function expands on the model described in Solow and Costello (2004) by facilitating the inclusion of external data to describe either introduction rate \mu_t or detection probability \Pi_{st}. The model with external data for detection probability (sampling-proxy model) is described fully in Buba et al (2024). The use of external data to describe the introduction rate has not been thoroughly evaluated. When no formula is defined for either, the function automatically fits the original Solow and Costello (2004) model using the length of the vector data as the independent variable t. All models return estimated parameters for both the introduction rate and the detection probability, with the parameter of interest usually being the change of introduction rate - \beta_1. For more details see the Basic Usage vignette: vignette("basic_usage", package = "alien")

Value

snc returns an object of class "snc" containing:

records the supplied first records data
convergence the optim convergence code.
log-likelihood the maximum log-likelihood.
coefficients a named vector of the ML estimates of the coefficients.
fitted.values the fitted mean \lambda values.
predict a data frame containing the estimated mean +- Standard error \mu values.

References

Solow, A. R., & Costello, C. J. (2004). Estimating the rate of species introductions from the discovery record. Ecology, 85(7), 1822–1825. https://doi.org/10.1890/03-3102

Buba, Y., Kiflwai, M., McGeoch, M. A., Belmaker, J. (2024) Evaluating models for estimating introduction rates of alien species from discovery records. https://doi.org/10.1111/geb.13859

Examples


# Solow and Costello (2004) model:
data(sfestuary)
example_model <- snc(sfestuary)
print(example_model)

# Buba et al (2024) sampling-proxy model:
data(medfish)
example_buba <- snc(y = aliens, pi = ~ natives, data = medfish)
print(example_buba)


[Package alien version 1.0.2 Index]