rsf.fit | R Documentation |

This function fits integrated resource selection functions with autocorrelation-adjusted weights on the RSF likelihood function, importance sampling, and iterative numerical convergence.

```
rsf.fit(data,UD,R=list(),formula=NULL,integrated=TRUE,level.UD=0.99,
reference="auto",debias=TRUE,smooth=TRUE,standardize=TRUE,integrator="MonteCarlo",
error=0.01,max.mem="1 Gb",interpolate=TRUE,trace=TRUE,...)
rsf.select(data,UD,R=list(),formula=NULL,verbose=FALSE,IC="AICc",trace=TRUE,...)
```

`data` |
A |

`UD` |
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 |

`integrated` |
Fit an integrated RSF model with simultaneously estimated spatial constraints. |

`level.UD` |
Coverage probability of |

`reference` |
When expanding categorical predictors into indicator variables, |

`debias` |
Apply a post-hoc bias correction to the spatial constraint parameters, and apply bias corrections to the numerical log-likelihood estimates. |

`smooth` |
Apply location-error smoothing to the tracking data before regression. |

`standardize` |
For numerical stability, predictors are |

`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 |

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.

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 and B. Reineking

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")}.

`ctmm.fit`

, `intensity`

, `optimizer`

, `summary.ctmm`

.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.