This function generates pseudo-absence points randomly across the study area (random background), optionally applying spatial thinning to match presence filtering strategy.
generate_pa_random(
presences,
study_area,
raster_stack,
predictor_variables,
coords = c("decimalLongitude", "decimalLatitude"),
ratio = 1,
attempts = 100,
seed = NULL
)
Data frame containing pseudo-absence points with coordinates, timestamp, pa = 0, and covariates.
Data frame containing presence points.
Spatial polygon defining the study area (`sf` object).
`SpatRaster` object containing covariate data.
Character vector of the predictor variables selected for this species.
Character vector specifying the column names for latitude and longitude. Defaults to `c("decimalLongitude", "decimalLatitude")`.
Ratio of pseudo-absences to presences (default 1 = balanced).
Integer specifying the number of attempts to generate exact pseudo-absences. Defaults to 100.
Optional random seed.