stdError: Standard error of MAT fitted and predicted values

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

Description

Computes the (weighted) standard deviation of the environment for the k-closest analogues for each sample. This was proposed as one measure of reconstruction uncertainty for MAT models (ter Braak, 1995).

Usage

1
2
3
4
5
6
7
stdError(object, ...)

## S3 method for class 'mat'
stdError(object, k, weighted = FALSE, ...)

## S3 method for class 'predict.mat'
stdError(object, k, weighted = FALSE, ...)

Arguments

object

Object for which the uncertainty measure is to be computed. Currently methods for mat and predict.mat.

k

numeric; how many analogues to take? If missing, the default, k is chosen using getK.

weighted

logical; use a weighted computation?

...

Additional arguments passed to other methods. Currently not used.

Details

Two types of standard error can be produced depending upon whether the mean or weighted mean of y for the k closest analogues is used for the MAT predictions. If weighted = FALSE then the usual standard deviation of the response for the k closest analogues is returned, whereas for weighted = TRUE a weighted standard deviation is used. The weights are the inverse of the dissimilarity between the target observation and each of the k closest analogues.

Value

A named numeric vector of weighted standard deviations of the environment for the k closest analogues used to compute the MAT predicted values.

The returned vector has attributes "k" and "auto", indicating the number of analogues used and whether this was determined from object or supplied by the user.

Author(s)

Gavin L. Simpson

References

Simpson, G.L. (2012) Analogue methods in palaeolimnology. In Birks, H.J.B, Lotter, A.F. Juggins S., and Smol, J.P. (Eds) Tracking Environmental Change Using Lake Sediments, Volume 5: Data Handling and Numerical Techniques. Springer, Dordrecht.

ter Braak, C.J.F. (1995) Non-linear methods for multivariate statistical calibration and their use in palaeoecology: a comparison of inverse (k-nearest neighbours, partial least squares, and weighted averaging partial least squares) and classical approaches. Chemometrics and Intelligent Laboratory Systems 28:165–180.

See Also

minDC, mat, predict.mat.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Imbrie and Kipp Sea Surface Temperature
data(ImbrieKipp)
data(SumSST)
data(V12.122)

## merge training set and core samples
dat <- join(ImbrieKipp, V12.122, verbose = TRUE)

## extract the merged data sets and convert to proportions
ImbrieKipp <- dat[[1]] / 100
ImbrieKippCore <- dat[[2]] / 100

## fit the MAT model using the squared chord distance measure
ik.mat <- mat(ImbrieKipp, SumSST, method = "SQchord")

## standard errors - unweighted
stdError(ik.mat)
## standard errors - weighted version for above
stdError(ik.mat, k = getK(ik.mat), weighted = TRUE)

## standard errors - weighted; note this uses more (7) analogues
## than the above as this model had lowest LOO error
stdError(ik.mat, weighted = TRUE)

## reconstruct for the V12-122 core data
coreV12.mat <- predict(ik.mat, V12.122, k = 3)
## standard errors
stdError(coreV12.mat)

analogue documentation built on June 21, 2021, 1:08 a.m.