Latent factors using the macro indicators.

Apply PCA to determine the number of latent factors using the macro indicators.

Estimate a hidden Markov model and find the optimal number of regimes (states).