This function simulates the prior distribution of the number of
latent factors for models that fulfill the identification restriction
restriction that at least Nid manifest variables (or no variables) are
loading on each latent factor. Several (scalar) parameters kappa can
be passed to the function to simulate the prior for different prior parameter
values and compare the results.
An accept/reject sampling scheme is used: a vector of probabilities is drawn
from a Dirichlet distribution with concentration parameter kappa, and
the nvar manifest variables are randomly allocated to the Kmax
latent factors. If each latent factor has at least Nid dedicated
variables or no variables at all, the identification requirement is fulfilled
and the draw is accepted. The number of factors loaded by at least Nid
manifest variables is returned as a draw from the prior distribution.
Note that this function does not use the two-level prior distribution
implemented in CFSHP, where manifest variables can be discarded from the
model according to a given probability. Therefore, this function only help
understand the prior distribution conditional on all the manifest variables
being included into the model.