criteria
a character vector with values of either IC1, IC2, IC3, AIC1, BIC1, AIC3, BIC3, or eigen.
Choosing eigen makes the number of factors equal to the number of columns whose sum of eigenvalues is less than or equal to .5.
demean
logical argument. If TRUE, function performs tests on demeaned
data. If FALSE, uses non-demeanded data generating process.