stdError {analogue}  R Documentation 
Computes the (weighted) standard deviation of the environment for the kclosest analogues for each sample. This was proposed as one measure of reconstruction uncertainty for MAT models (ter Braak, 1995).
stdError(object, ...) ## S3 method for class 'mat' stdError(object, k, weighted = FALSE, ...) ## S3 method for class 'predict.mat' stdError(object, k, weighted = FALSE, ...)
object 
Object for which the uncertainty measure is to be
computed. Currently methods for 
k 
numeric; how many analogues to take? If missing, the default,

weighted 
logical; use a weighted computation? 
... 
Additional arguments passed to other methods. Currently not used. 
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.
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.
Gavin L. Simpson
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) Nonlinear methods for multivariate statistical calibration and their use in palaeoecology: a comparison of inverse (knearest neighbours, partial least squares, and weighted averaging partial least squares) and classical approaches. Chemometrics and Intelligent Laboratory Systems 28:165–180.
minDC
, mat
,
predict.mat
.
## 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 V12122 core data coreV12.mat < predict(ik.mat, V12.122, k = 3) ## standard errors stdError(coreV12.mat)