mat.h: MAT with minimum geographic distance for analogues

Description Usage Arguments Details Value Author(s) References Examples

Description

h-block cross-validation for MAT.

Usage

1
mat.h(y, x, noanalogues, geodist, thresh)

Arguments

y

Community data or distance matrix

x

Environmental variable

noanalogues

Number of analogues

geodist

Geographical distances

thresh

Threshold distance below which sites are excluded during cross validation

Details

Analogues closer than the geographic distance specified by thresh are not excluded, reducing the effect of spatial autocorrelation on the performance statistics. H-block cross-validation is also implemented in the rioja package. This function can be faster if used many times as it can take a pre-calculated distance matrix.

Value

Predictions for each site.

Author(s)

Richard Telford [email protected]

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
require(fields)
data(arctic.env)
data(arctic.pollen)
arctic.dist <- rdist.earth(arctic.env[,c("Longitude", "Latitude")], miles=FALSE)


h0 <- mat.h(arctic.pollen, arctic.env$tjul, noanalogues = 10, arctic.dist, thresh=-1)
h100 <- mat.h(arctic.pollen, arctic.env$tjul, noanalogues = 10, arctic.dist, thresh=100)

cor(h0, arctic.env$tjul)
cor(h100, arctic.env$tjul)

sqrt(mean((h0 - arctic.env$tjul)^2))
sqrt(mean((h100 - arctic.env$tjul)^2))

palaeoSig documentation built on May 29, 2017, 9:11 a.m.