Internal function: M-fold Cross-validation
spatpcaCV(sxyr, Yr, M, K, tau1r, tau2r, gammar, nkr, maxit, tol, l2r)
A list of selected parameters
A location matrix
A data matrix
The number of folds for CV
The number of estimated eigen-functions
A range of tau1
A range of tau2
A range of gamma
A vector of fold numbers
A maximum number of iteration
A tolerance rate
A given tau2