Factor density estimation using leave k-out
[res] = factor_density_lko1(Z,meth,nb_draws,tau)
* Z = a (nobs x k) matrix, collecting the variables
* meth = 'stan' if the user wants to perform the analysis on standardized variables
* nb_draws = an integer, number of resamples
* tau = Rejection probability (OPTIONAL: default=0.1)
* res = a results tlist, with:
- res('meth') = 'factor density via leave k-out resampling'
- res('y') = the (nobs x k) matrix collecting the variables
- res('standardization') = a boolean, indicating whether variables have been standardized
- res('# of draws') = an integrer, the # of draws
- res('rejection prob.') = a real, the rejection probability
- res('factors') = a (nobs x nb_draws) matrix, the factor density
- res('factors percentiles') = a (nobs x 5) matrix, the percentiles (2.5, 25, 50, 75 and 97.5)
- res('k out resampling') = a (nobs x nb_draws) matrix, the number of variables kept at each draw