Wrapper function for pseudo-absence generation methods, such as background random points, target-group, and using buffer area.
generate_pseudo_absences(
method = c("random", "target_group", "buffer_out"),
presences,
raster_stack,
predictor_variables,
study_area = NULL,
target_group_points = NULL,
coords = c("decimalLongitude", "decimalLatitude"),
pa_buffer_distance = 0.5,
ratio = 1,
attempts = 100,
seed = NULL
)
A data frame of pseudo-absence points (pa = 0) with covariates.
Character; one of "random", "target_group", or "buffer_out".
Data frame of presence points with coordinates and timestamp.
SpatRaster of covariates.
Character vector of selected predictors.
Optional sf polygon (used for clipping).
Optional data frame of sampling points (for target-group).
Vector of coordinate column names.
Numeric; buffer radius in degrees around each presence. Default is 0.5.
Ratio of pseudo-absences to presences.
Max attempts to fulfill sample size.
Optional seed for reproducibility.