correcting errors in estim_ncpPCA for loo and kfold functions