snc {alien}R Documentation

Fit Solow and Costello (2004) model

Description

Fit the model described in Solow and Costello (2004) to data. It can use external data on either \mu_t or \Pi_{st}.

Usage

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

Arguments

y

a time series of the annual number of discovered alien and invasive species (IAS)

mu

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

pi

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

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 \mu_t or \Pi_{st}. The model with external data is described fully in Buba et al (2024). 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. The original model uses Rcpp for shorter run time. When numerous estimations are required for a more elaborate model (i.e, for simulation studies or bootstrapping), users may be benefit from building upon the function described in filename.cpp

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

Examples


data(sfestuary)
example_model <- snc(sfestuary)
print(example_model)


[Package alien version 1.0.1 Index]