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 |
pi |
a formula defining the predictors for |
data |
a data frame containing the variables in the model(s). |
init |
Optional. Initial values supplied to |
growth |
logical. Should the population growth parameter |
type |
Define whether the mu function should be on "linear" or "exponential" scale. Defaults to "exponential". |
... |
Further arguments passed to |
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)