Skip to contents

Zone of influence (ZoI) functions

Functions to represent the zone of influence

dist_decay() threshold_decay() step_decay() bartlett_decay() tent_decay() linear_decay() gaussian_decay() half_norm_decay() exp_decay()
Zone of Influence (ZOI) functions
plot_zoi1d()
Plot the functions for the nearest and cumulative zone of influence in 1 dimension

Compute zones of influence (ZoI)

Functions to compute the zone of influence for raster maps

calc_zoi()
Calculates the zone of influence from the nearest feature and the cumulative zone of influence of multiple features
calc_zoi_cumulative()
Calculate the cumulative zone of influence of multiple features
calc_zoi_nearest()
Calculate the zone of influence from the nearest feature
calc_zoi_sql()
Compute Zone of Influence for points and annotate them to points using SQL

Spatial filters

Creating spatial filters to compute a meaningful zone of influence

filter_create()
Create filters or kernel matrices for raster neighborhood analyses
filter_na_strata()
Remove missing values and ensure case-control per stratum
filter_save()
Save kernel/filter matrix to use outside R

Estimating ZOI - set up analysis

Functions to set up RSF and SSF analyses using ZOI variables

add_zoi_formula()
Adds ZOI radii to formula
add_zoi_layers()
Create ZOI layer names as strings for data annotation
explore_blocks()
Explore hierarchical blocks after sampling or spatial stratification
explore_blocks_pre()
Explore potential hierarchical blocks before sampling or spatial stratification
spat_strat()
Preparing data for spatially stratified cross‐validation schemes
create_resamples()
Create samples for fitting, calibrating, and validating models

Estimating ZOI - fit models

Functions to fit RSF and SSF and estimate ZOI using penalized regression

filter_na_strata()
Remove missing values and ensure case-control per stratum
extract_response_strata()
Separates elements in a statistical formula
net_clogit() net_ssf() net_issf()
Fits a conditional logistic regression/SSF/iSSF using glmnet
net_logit() net_rsf()
Fits a logistic regression/RSF using glmnet
fit_net_clogit() fit_net_ssf() fit_net_issf()
Fits a conditional logistic regression/SSF/iSSF with penalized regression using glmnet in a train-validate-test setup
fit_net_logit() fit_net_rsf()
Fit logistic regression/RSF with penalized regression using glmnet in a train-validate-test setup
bag_fit_net_clogit()
Fit a bag of conditional logistic regression/SSF/iSSF models with penalized regression in a train-validate-test setup
bag_fit_net_logit()
Fit a bag of logistic regression/RSF models with penalized regression in a train-validate-test setup
bag_load_models()
Load a series of files output of fit_net_clogit models and put them on a bag
bag_models() w_strech_maxmin_squared() w_strech_max_squared() score2weight_mean() score2weight_min_mean() score2weight_invmean() score2weight_min_invmean()
Summary of a bag of models
conditionalBoyce() conditionalSomersD() conditionalAUC() AUC() coxnet.deviance() Cindex()
Computes the conditional Boyce index for model evaluation
kernel_prediction()
Prediction based only on step length terms
pretty_seq()
Set sampling parameters

Estimating ZOI - interpret and visualize models

Functions to help interpreting parameters and visualizing cumulative impacts

bag_predict()
Prediction of a bag of models to new data
plot_importance()
Plot variable importance
variable_importance()
Computes variable importance
plot_coef()
Plot the coefficients of bags of models
plot_response()
Plot responses from a bag of models
bag_predict_spat() bag_predict_spat_vars()
Predict bag of models in space
rescale_coefficients()
Rescale standardized coefficients back to their original range after model fitting

Raster processing ancillary functions

GRASS GIS ancillary functions to process rasters and prepare inputs for computing zones of influence

grass_binarize()
Binarize continuous raster maps
grass_find_layer()
Find layers within GRASS GIS with multiple patterns
grass_v2rast_count()
Rasterizes a vector counting the number of features in each pixel
raster_rescale()
Rescale raster values

Support for landscape simulation

set_points()
Simulate points in a landscape
set_points_from_raster()
Simulate points using input raster as weights
set_points_sample()
Simulate regular or random points in 2D
isolation() mean_isolation()
Isolation and mean isolation of points in space

Datasets

Datasets for testing the ZoI approach

reindeer
GPS positions for wild reindeer in Norway.
reindeer_area.gpkg
Reindeer area: a polygon vector data for the Setesdal Austhei reindeer herding area
reindeer_cabins.gpkg
Cabins vector data for the reindeer area
reindeer_roads_private.gpkg
Private roads vector data for the reindeer area
reindeer_roads_public.gpkg
Public roads vector data for the reindeer area
reindeer_rsf
Annotated data of wild reindeer in Norway, prepared for point resource-selection analysis.
reindeer_ssf
Annotated data of wild reindeer in Norway, prepared for step-selection analysis.
sample_area_cabins.tif
Cabin presence raster data for the sample area
sample_area_cabins_count.tif
Cabin count raster data for the sample area
sample_area_roads.tif
Road raster data for the sample area
sample_area.gpkg
Sample area: a polygon vector data
sample_area_cabins.gpkg
Cabins vector data for the sample area
sample_area_roads.gpkg
Road vector data for the sample area