randomTF: Proportion of variance in the fossil data explained by an...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/randomTF.R

Description

Calculate the proportion of variance in the fossil data explained by an environmental reconstruction with a constrained ordination. This value is compared with a null distribution calculated as the proportion of variance in the fossil data explained by reconstructions from transfer functions trained on random data.

Usage

1
2
3
4
5
randomTF(spp, env, fos, n = 99, fun, col, condition, autosim, ord = rda,...)
ModelMaker(spp, env, n=99, fun, autosim, ...)
randomTFmm(fos, modelList, col, condition, ord=rda, ...)
## S3 method for class 'palaeoSig'
plot(x, vnames, top = 0.7, adj = c(0, 0.5), p.val=0.95, ...)

Arguments

spp

Data frame of modern training set species data, transformed as required for example with sqrt

env

Data frame of training set environmental variables

fos

Data frame of fossil species data, with same species codes and transformations as spp

n

number of random training sets

fun

Transfer function method. Additional argument can be passed with ...

col

Some transfer functions return more than one column of results, for example with different WAPLS components. col selects which column to use. See the relevant transfer function method help file.

condition

Optional data frame of reconstructions to partial out when testing if multiple independent reconstructions are possible.

autosim

Optional data frame of random values. This is useful if the training set is spatially autocorrelated and the supplied data frame contains autocorrelated random variables. If autosim is missing, the transfer functions are trained on random variables drawn from a uniform distribution.

ord

Constrained ordination method to use. rda is the default, cca should also work. capscale won't work without modifications to the code (or a wrapper).

...

Other arguments to the transfer function. For example to change the distance metric in MAT. Also extra arguments to plot.

modelList

Output of ModelMaker

x

Output from randomTF

vnames

Names of environmental variables

top

Proportion of the figure below the environmental name labels.

adj

Adjust the position that the environmental names are plotted at.

p.val

P value to draw a line vertical line at (with which=2)

Details

The function calculates the proportion of variance in the fossil data explained by the transfer function reconstruction. This is compared with a null distribution of the proportion of variance explained by reconstructions based on random environmental variables. Reconstructions can be partialled out to test if multiple reconstructions are statistically significant. If the environment is spatially autocorrelated, a red-noise null should be used instead of the default white noise null. The red noise environmental variables can be generated with the gstat package.

Any transfer function in the rioja package can be used. Other methods (e.g. random forests) can be used by making a wrapper function.

If several reconstructions using the same training set are being tested, it can be much faster to make the models once, and use them repeatedly. This can be done with ModelMaker and randomTFmm. ModelMaker does not work with MAT.

Value

A list with components

PCA

The unconstrained ordination of the fossil data.

preds

A list of the containing the reconstructions for each environmental variable.

MAX

Proportion of the variance explained by the first axis of the unconstrained ordination. This is the maximum amount that a reconstruction of a single variable can explain.

EX

The proportion of the variance in the fossil data explained by each reconstruction.

sim.ex

The proportion of variance explained by each of the random environmental variables.

sig

The p-value of each reconstruction.

ModelMaker returns a list of models.

Note

If there are only a few fossil levels, obs.cor might have more power. If there are few taxa, tests on MAT reconstructions have more statistical power than those based on WA.

Author(s)

Richard Telford [email protected]

References

Telford, R. J. and Birks, H. J. B. (2011) A novel method for assessing the statistical significance of quantitative reconstructions inferred from biotic assemblages. Quaternary Science Reviews 30: 1272–1278. DOI: 10.1016/j.quascirev.2011.03.002

See Also

obs.cor, WA, MAT, WAPLS, rda, cca

Examples

1
2
3
4
5
6
7
8
require(rioja)
data(SWAP)
data(RLGH)

rlghr <- randomTF(spp = sqrt(SWAP$spec), env = data.frame(pH = SWAP$pH), 
    fos = sqrt(RLGH$spec), n = 99, fun = WA, col = 1)
rlghr$sig
plot.palaeoSig(rlghr, "pH")

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