biasGrid: Create a bias grid from polygons using a gaussian moving...

Description Usage Arguments Value See Also Examples

Description

Given a SpatialPolygons* object representing observed occurrence of a reference disease group (polygons) and a template raster (raster), use a Gaussian moving window smoother with standard deviation sigma to generate a smoothed raster of the expected density of observations. See gaussWindow for details of the Gaussian smoother. The resulting bias grid can be used to select pseudo-absence points in order to account for observation bias in the occurrence dataset.

Usage

1
biasGrid(polygons, raster, sigma = 30)

Arguments

polygons

A SpatialPolygons* object.

raster

A template raster for the resulting bias grid.

sigma

The standard deviation, in map units, of the Gaussian smoother.

Value

A raster of the expected density of occurrence records.

See Also

gaussWindow, focal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# load a test raster
raster <- raster(system.file("external/test.grd", package="raster"))

# define some occurrence points
pts <- matrix(c(179000, 330000,
                181000, 333000,
                180000, 332000),
              ncol = 2,
              byrow = TRUE)

# build a SpatialPoints object with them
pts <- SpatialPoints(pts, raster@crs)

# buffer them to create polygons
polygons <- gBuffer(pts, width = 50, byid = TRUE)

# run biasGrid with a fairly large sigma (500 metres)
bias <- biasGrid(polygons, raster, sigma = 500)

# and plot the results
plot(bias)
plot(polygons, add = TRUE)

SEEG-Oxford/seegSDM documentation built on May 9, 2019, 11:08 a.m.