Skip to contents

Functions and classes to manage outputs of two-fold cross-validation for one (class randxval) or several (class krandxval) statistics

Usage

as.krandxval(RMSEc, RMSEv, quantiles = c(0.25, 0.75), names =
colnames(RMSEc), call = match.call())
# S3 method for class 'krandxval'
print(x, ...)
as.randxval(RMSEc, RMSEv, quantiles = c(0.25, 0.75), call =
match.call())
# S3 method for class 'randxval'
print(x, ...)

Arguments

RMSEc

a vector (class randxval) or a matrix (class krandxval) with the root-mean-square error of calibration (statistics as columns and repetions as rows)

RMSEv

a vector (class randxval) or a matrix (class krandxval) with the root-mean-square error of validation (statistics as columns and repetions as rows)

quantiles

a vector indicating the lower and upper quantiles to compute

names

a vector of names for the statistics

call

the matching call

x

an object of class randxval or krandxval

...

other arguments to be passed to methods

Value

an object of class randxval or krandxval

References

Stone M. (1974) Cross-validatory choice and assessment of statistical predictions. Journal of the Royal Statistical Society, 36, 111-147

Author

Stéphane Dray (stephane.dray@univ-lyon1.fr)

Examples

## an example corresponding to 10 statistics and 100 repetitions
cv <- as.krandxval(RMSEc = matrix(rnorm(1000), nrow = 100), RMSEv =
matrix(rnorm(1000, mean = 1), nrow = 100))
cv
#> Two-fold cross-validation
#> Call: as.krandxval(RMSEc = matrix(rnorm(1000), nrow = 100), RMSEv = matrix(rnorm(1000, 
#>     mean = 1), nrow = 100))
#> 
#> Results for 10 statistics
#> 
#> Root mean square error of calibration:
#>    N.rep         Mean        25%       75%
#> 1    100  0.142043316 -0.4854110 0.6610694
#> 2    100  0.022489748 -0.7643498 0.8638528
#> 3    100  0.147240407 -0.4180910 0.5292530
#> 4    100  0.004430328 -0.6915324 0.6612797
#> 5    100 -0.023314931 -0.6640441 0.4803594
#> 6    100  0.049545920 -0.6698139 0.7690557
#> 7    100  0.001891899 -0.5734724 0.5626768
#> 8    100 -0.031511271 -0.7024894 0.7119892
#> 9    100  0.209348635 -0.5171090 0.8590233
#> 10   100  0.103047726 -0.4413409 0.5867058
#> 
#> Root mean square error of validation:
#>    N.rep      Mean       25%      75%
#> 1    100 1.0796988 0.4373304 1.658407
#> 2    100 0.9571045 0.3656812 1.705830
#> 3    100 0.8884501 0.1170862 1.607586
#> 4    100 0.9514055 0.4323792 1.646315
#> 5    100 0.8639607 0.2500828 1.630961
#> 6    100 0.8397196 0.1839404 1.510433
#> 7    100 0.9293643 0.2273426 1.661941
#> 8    100 1.0071851 0.3303682 1.838745
#> 9    100 0.9514881 0.4014976 1.592130
#> 10   100 0.8739697 0.1033577 1.520253
if(adegraphicsLoaded())
plot(cv)