RSF.fit.Rd
This function fits integrated resource selection functions with autocorrelation-adjusted weights on the RSF likelihood function, importance sampling, and iterative numerical convergence.
A telemetry
object.
A UD
object generated by akde
from the same telemetry object as data
. If weights were optimized in akde
, then they will be adopted by rsf.fit
.
A named list of rasters or time-varying raster stacks [NOT TESTED] to fit Poisson regression coefficients to (under a log link).
Formula object for \(\log(\lambda)\) referencing the elements of R
and columns of data
(see Details below). If not specified, a linear term will be included for every element of R
.
Fit an integrated RSF model with simultaneously estimated spatial constraints. integrated=FALSE
is for comparison purposes only.
Coverage probability of UD
to sample uniformly from if integrated=FALSE
. Can also be a pre-defined spatial polygon object.
When expanding categorical predictors into indicator variables, reference="auto"
will choose the most common predictor to be the reference category. Otherwise, the reference category can be specified by this argument.
Apply a post-hoc bias correction to the spatial constraint parameters, and apply bias corrections to the numerical log-likelihood estimates.
Apply location-error smoothing to the tracking data before regression.
For numerical stability, predictors are internally standardized, if standardize=TRUE
and no formula
is specified. (The final outputs are not standardized.) Otherwise, users are responsible for standardizing their predictors.
Numerical integrator used for likelihood evaluation. Can be "MonteCarlo"
or "Riemann"
(IN TESTING).
Relative numerical error threshold for the parameter estimates and log-likelihood.
Maximum amount of memory to allocate for availability sampling.
Whether or not to interpolate raster values during extraction.
Report progress on convergence (see Details).
Returns all candidate models if TRUE
. Otherwise, only the IC
-best model is returned.
Model selection criterion. Can be AIC, AICc, or BIC.
Arguments passed to rsf.fit
or optimizer
.
For autocorrelated tracking data, the relative weights of the log-likelihood used here are taken from the output of akde
, which are optimzed for non-parametric denstity estimation (if weights=TRUE
, and so are approximate here. The absolute weight of the data is taken to be the effective sample size of the integrated spatial parameters, when estimated seperately.
Integrated resource selection functions simultaneously estimate the spatially constraining (availability) parameters with the resource selection parameters, rather than first estimating the availability parameters (usually via MCP) and then holding those parameters fixed---as known values---when estimating the resource selection parameters. The ``integrated'' analysis reduces estimation bias, exposes correlations in the resource and availability estimate uncertainties, and propagates the availability estimate uncertainties into the final outputs.
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 the covariate dependence of \(\log(\lambda)\) in the Poisson point process likelihood \(L(\lambda)=\frac{\lambda(x,y)}{\iint \lambda(x',y') \, dx' dy'}\), 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.
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) doi:10.1111/2041-210X.14025 .
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.