stdError {analogue}R Documentation

Standard error of MAT fitted and predicted values

Description

Computes the weighted standard deviation of the environment for the k-closest analogues for each sample. This measure is proposed as a measure of reconstruction uncertainty for MAT models.

Usage

stdError(object, ...)

## S3 method for class 'mat':
stdError(object, k, ...)

## S3 method for class 'predict.mat':
stdError(object, k, ...)

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.
... Additional arguments passed to other methods. Currently not used.

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

See Also

minDC, mat, predict.mat.

Examples

## 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
stdError(ik.mat)

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

[Package analogue version 0.6-22 Index]