Do a random t-test to the cross-validation results.

rand.t.test.w(cvoutput, n.perm = 999)

Arguments

cvoutput

Cross-validation output either from cv.w or cv.pr.w.

n.perm

The number of permutation times to get the p value, which assesses whether using the current number of components is significantly different from using one less.

Value

A matrix of the statistics of the cross-validation results. Each component is described below:

R2

the coefficient of determination (the larger, the better the fit).

Avg.Bias

average bias.

Max.Bias

maximum bias.

Min.Bias

minimum bias.

RMSEP

root-mean-square error of prediction (the smaller, the better the fit).

delta.RMSEP

the percent change of RMSEP using the current number of components than using one component less.

p

assesses whether using the current number of components is significantly different from using one component less, which is used to choose the last significant number of components to avoid over-fitting.

-

The degree of overall compression is assessed by doing linear regression to the cross-validation result and the observed climate values.

  • Compre.b0: the intercept.

  • Compre.b1: the slope (the closer to 1, the less the overall compression).

  • Compre.b0.se: the standard error of the intercept.

  • Compre.b1.se: the standard error of the slope.

See also

Examples

if (FALSE) {

## Random t-test
rand_pr_tf_Tmin2 <- fxTWAPLS::rand.t.test.w(cv_pr_tf_Tmin2, n.perm = 999)

# note: choose the last significant number of components based on the p-value,
# see details at Liu Mengmeng, Prentice Iain Colin, ter Braak Cajo J. F.,
# Harrison Sandy P.. 2020 An improved statistical approach for reconstructing
# past climates from biotic assemblages. Proc. R. Soc. A. 476: 20200346.
# <https://doi.org/10.1098/rspa.2020.0346>
}