sdm.fit | R Documentation |
This function fits species distribution models, sampling density models, and integrated SDMs.
sdm.fit(data,R=list(),formula=NULL,area=NULL,reference="auto",standardize=TRUE,
integrator="MonteCarlo",error=0.01,max.mem="1 Gb",interpolate=TRUE,trace=TRUE,...)
sdm.select(data,R=list(),formula=NULL,area=NULL,verbose=FALSE,IC="AICc",trace=TRUE,...)
sdm.integrate(biased=NULL,bias=NULL,unbiased=NULL)
data |
A |
R |
A named list of rasters or time-varying raster stacks [NOT TESTED] to fit Poisson regression coefficients to (under a log link). |
formula |
Formula object for |
area |
A spatial polygon object defining the extent of the SDM. If left |
reference |
When expanding categorical predictors into indicator variables, |
standardize |
For numerical stability, predictors are internally standardized, if |
integrator |
Numerical integrator used for likelihood evaluation. Can be |
error |
Relative numerical error threshold for the parameter estimates and log-likelihood. |
max.mem |
Maximum amount of memory to allocate for availability sampling. |
interpolate |
Whether or not to interpolate raster values during extraction. |
trace |
Report progress on convergence (see Details). |
verbose |
Returns all candidate models if |
IC |
Model selection criterion. Can be AIC, AICc, or BIC. |
... |
Arguments passed to |
biased |
A biased SDM calculated from occurrence records with non-uniform sampling density. |
bias |
An “SDM” calculated from data representative of the above sampling density. |
unbiased |
An unbiased SDM or list of RSFs. |
Instead of specifying a number of “available” points to sample and having an unknown amount of numerical error to contend with, rsf.fit
specifies an estimation target error
and the number of “available” points is increased until this target is met. Moreover, the output log-likelihood is that of the continuous Poisson point process, which does not depend on the number of “available” points that were sampled, though the numerical variance estimate is recorded in the VAR.loglike
slot of the fit object.
When trace=TRUE
, a number of convergence estimates are reported, including the standard deviation of the numerical error of the log-likelihood, SD[\log(\ell)
], the most recent log-likelihood update, d\log(\ell)
, and the most recent (relative) parameter estimate updates d\hat{\beta}/
SD[\hat{\beta}
].
The formula
object determines \log(\lambda)
and can reference static rasters in R
, time-dependent raster stacks in R
[NOT TESTED], and time-dependent effect modifiers in the columns of data
, such as provided by annotate
.
Any offset
terms are applied under a log transformation (or multiplicatively to \lambda
), and can be used to enforce hard boundaries,
where offset(raster)=TRUE
denotes accesible points and offset(raster)=FALSE
denotes inaccessible points [NOT TESTED].
Intercept terms are ignored, as they generally do not make sense for individual Poisson point process models.
This includes terms only involving the columns of data
, as they lack spatial dependence.
Categorical raster variables are expanded into indicator variables, according to the reference
category argument.
Upon import via raster
, categorical variables may need to be assigned with as.factor
, or else they may be interpreted as numerical variables.
It is much faster to calculate all predictors ahead of time and specifying them in the R
list than to reference then in the formula
argument, which will calculate them as needed, saving memory.
AIC and BIC values for integrated=FALSE
models do not include any penalty for the estimated location and shape of the available area, and so their AIC and BIC values are expected to be worse than reported.
C. H. Fleming
J. M. Alston, C. H. Fleming, R. Kays, J. P. Streicher, C. T. Downs, T. Ramesh, B. Reineking, & J. M. Calabrese, “Mitigating pseudoreplication and bias in resource selection functions with autocorrelation-informed weighting”, Methods in Ecology and Evolution 14:2 643–654 (2023) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/2041-210X.14025")}.
rsf.fit
, optimizer
, summary.ctmm
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.