The function checks linear models with cross-validation (out-of-sample prediction).
cvlm(y, x, subsize, iter = 100)
dependent variable.
design matrix (should include constant if it is needed).
sample size of subsampling.
number of iterations.
The function returns a list with following components.
root mean squares of forecast errors for all iterations.
mean absolute forecast errors for all iterations.
Tsay, R. and Chen, R. (2018). Nonlinear Time Series Analysis. John Wiley & Sons, New Jersey.