Skip to contents

This function adds a presence-absence biodiversity dataset to a distribution object. Opposed to presence-only data, presence-absence biodiversity records usually originate from structured biodiversity surveys where the absence of a species in a given region was specifically assessed.

If it is the analysts choice it is also possible to format presence-only biodiversity data into a presence-absence form, by adding pseudo-absence through add_pseudoabsence. See the help file for more information.

Usage

add_biodiversity_poipa(
  x,
  poipa,
  name = NULL,
  field_occurrence = "observed",
  formula = NULL,
  family = "binomial",
  link = NULL,
  weight = 1,
  separate_intercept = TRUE,
  docheck = TRUE,
  ...
)

# S4 method for class 'BiodiversityDistribution,sf'
add_biodiversity_poipa(
  x,
  poipa,
  name = NULL,
  field_occurrence = "observed",
  formula = NULL,
  family = "binomial",
  link = NULL,
  weight = 1,
  separate_intercept = TRUE,
  docheck = TRUE,
  ...
)

Arguments

x

distribution() (i.e. BiodiversityDistribution) object.

poipa

A data.frame or sf object of presence-absence point occurrences.

name

The name of the biodiversity dataset used as internal identifier.

field_occurrence

A numeric or character location of biodiversity point records indicating presence/absence. By default set to "observed" and an error will be thrown if a numeric column with that name does not exist.

formula

A character or formula object to be passed. Default (NULL) is to use all covariates.

family

A character stating the family to be used (Default: 'binomial').

A character to overwrite the default link function (Default: NULL).

weight

A numeric value acting as a multiplier with regards to any weights used in the modelling. Larger weights indicate higher weighting relative to any other datasets. By default set to 1 if only one dataset is added. A vector is also supported but must be of the same length as parameter "poipa".

separate_intercept

A logical value stating whether a separate intercept is to be added in. shared likelihood models for engines engine_inla, engine_inlabru and engine_stan.

docheck

logical on whether additional checks should be performed (e.g. intersection tests) (Default: TRUE).

...

Other parameters passed down.

Value

Adds biodiversity data to distribution object.

Details

By default, the logit link function is used in a logistic regression setting unless the specific engine does not support generalised linear regressions (e.g. engine_bart).

References

  • Renner, I. W., J. Elith, A. Baddeley, W. Fithian, T. Hastie, S. J. Phillips, G. Popovic, and D. I. Warton. 2015. Point process models for presence-only analysis. Methods in Ecology and Evolution 6:366–379.

  • Guisan A. and Zimmerman N. 2000. Predictive habitat distribution models in ecology. Ecol. Model. 135: 147–186.

See also

Examples

if (FALSE) { # \dontrun{
# Define model
x <- distribution(background) |> add_biodiversity_poipa(virtual_species)
} # }