Learn R Programming

palaeoSig (version 2.0-3)

rne: Random, neighbour, environment deletion analysis for transfer function model

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

rne(y, env, geodist,fun, neighbours, subsets = c(1, 0.75, 0.5, 0.25, 0.1), ...) 
# S3 method for RNE
plot(x, which=1, ylim, ...)

Arguments

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

...

Arguments passed to fun or plot

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

Value

Returns an RNE object, list with two components

random

Performance with random deletion.

neighbour

Performance with deletion by neighourhood, or environment

Details

Finds the leave-one-out transfer function performance if sites are deleted at random (repeated 10 times to reduce variance in results), from a neighbourhood zone, or by deleting environmentally close sites.

References

Telford, R. J. and Birks, H. J. B. (2009) Evaluation of transfer functions in spatially structured environments. Quaternary Science Reviews 28: 1309--1316. DOI: 10.1016/j.quascirev.2008.12.020

Examples

Run this code
# NOT RUN {
  require(fields)
  require(rioja)
  data(arctic.env)
  data(arctic.pollen)

  
# }
# NOT RUN {
  
# }
# NOT RUN {
    #using just the first 100 sites so code runs in an reasonable time, but still slow
    arctic.d <- rdist.earth(arctic.env[1:100,c("Longitude","Latitude")], miles = FALSE)
    
    arctic.rne <- rne(y = arctic.pollen[1:100,], env = arctic.env$tjul[1:100],
        geodist = arctic.d, fun = MAT, neighbours = c(0,50,200), 
        subsets = c(1,.5,.1), k = 5)
    plot(arctic.rne)
  
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab