rne: Random, neighbour, environment deletion analysis for transfer...

View source: R/rne.R

plot.RNER Documentation

Random, neighbour, environment deletion analysis for transfer function models

Description

Calculates effect of deleting sites from training set at random, from a geographic neighbourhood, or from an environmental neighbourhood. A simple graphical technique for gauging the effect of spatial autocorrelation on the transfer function model.

Usage

## S3 method for class 'RNE'
plot(x, which = 1, ylim, ...)

rne(
  y,
  env,
  geodist,
  fun,
  neighbours,
  subsets = c(1, 0.75, 0.5, 0.25, 0.1),
  ...
)

Arguments

x

RNE object to be plotted

which

Which column of the results to plot eg if more than one WAPLS component is calculated

ylim

Y-limits of the plot

...

Arguments passed to fun

y

Community data, or distance object, or distance matrix

env

Environmental variable

geodist

Matrix of geographical distances between sites

fun

Transfer function

neighbours

Neighbourhood radii

subsets

Proportion of sites to retain in random deletion

Details

Finds the leave-one-out transfer function performance if sites are deleted at random, from a neighbourhood zone, or by deleting environmentally close sites.

Prior to version 2.1, this function would repeat the random removal 10 times to reduce variance in results. This is no longer done as the variance is small for large training sets, it took a long time, and treats one treatment of the data differently.

Value

Returns an RNE object, list with two components

  • random Performance with random deletion.

  • neighbour Performance with deletion by neighbourhood, or environment

Functions

  • plot(RNE): Plot RNE object

Author(s)

Richard Telford Richard.Telford@bio.uib.no

References

Telford, R. J. and Birks, H. J. B. (2009) Evaluation of transfer functions in spatially structured environments. Quaternary Science Reviews 28: 1309–1316. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1016/j.quascirev.2008.12.020")}

Examples

require(rioja)
require(sf)
data(arctic.env)
data(arctic.pollen)

# using just the first 100 sites so that code runs quickly (about 15 seconds for all 828 sites)

# convert environmental data into an sf object
arctic.env <- st_as_sf(
  x = arctic.env,
  coords = c("Longitude", "Latitude"),
  crs = 4326
)

# find great circle distances and remove units
arctic.dist <- st_distance(arctic.env[1:100, ]) |>
  units::set_units("km") |>
  units::set_units(NULL)

# rne
arctic.rne <- rne(
  y = arctic.pollen[1:100, ], env = arctic.env$tjul[1:100],
  geodist = arctic.dist, fun = MAT, neighbours = c(0, 200),
  subsets = c(1, .5), k = 5
)

plot(arctic.rne)

palaeoSig documentation built on March 31, 2023, 9:34 p.m.