
RMSEP(object, ...)## S3 method for class 'mat':
RMSEP(object, k, weighted = FALSE,
\dots)
## S3 method for class 'bootstrap.mat':
RMSEP(object, type = c("birks1990", "standard"),
...)
k
is extracted from the
model using getK
.object
. In the wider statistical literature, the following form of RMSEP is
more commonly used:
The first form of RMSEP is returned by default or if type =
"birks1990"
is supplied. The latter form is returned if type
= "standard"
is supplied.
The RMSEP for objects of class "mat"
is a leave-one-out
cross-validated RMSEP, and is calculated as for type =
"standard"
.
mat
, bootstrap
## continue the RLGH and SWAP example from ?join
example(join)
## fit the MAT model using the squared chord distance measure
swap.mat <- mat(swapdiat, swappH, method = "SQchord")
## Leave-one-out RMSEP for the MAT model
RMSEP(swap.mat)
## bootstrap training set
swap.boot <- bootstrap(swap.mat, n.boot = 100)
swap.boot
## extract the Birks et al (1990) RMSEP
RMSEP(swap.boot)
## Calculate the alternative formulation
RMSEP(swap.boot, type = "standard")
Run the code above in your browser using DataLab