post.column.switch {BayesFM}R Documentation

Perform column switchting on posterior MCMC sample

Description

This function reorders the columns of the factor loading matrix for each MCMC draw, as well as the rows and columns of the correlation matrix of the factors, to restore the identification of the model a posteriori with respect to the column switching problem.

Usage

post.column.switch(mcmc)

Arguments

mcmc

Object of class 'befa'.

Details

The reordering of the columns of the factor loading matrix is based on the top elements of the columns (i.e., the first row containing a nonzero factor loading in each nonzero column of α, starting from the top of the matrix). At each MCMC iteration, the nonzero columns of α are reordered such that the top elements appear in increasing order. The rows and columns of the correlation matrix R of the factors are switched accordingly. See section 4.3 of CFSHP (p.42) for more details.

Value

Same 'befa' object as the one passed to the function, where the indicators in the matrix dedic, as well as the rows and columns of the correlation matrix of the factors saved in draws, have been switched appropriately to restore the identification of the factor model with respect to column switching.

Author(s)

Rémi Piatek remi.piatek@gmail.com

References

G. Conti, S. Frühwirth-Schnatter, J.J. Heckman, R. Piatek (2014): “Bayesian Exploratory Factor Analysis”, Journal of Econometrics, 183(1), pages 31-57, doi: 10.1016/j.jeconom.2014.06.008.

See Also

post.sign.switch to restore identification a posteriori with respect to the sign switching problem.

Examples

set.seed(6)
Y <- simul.dedic.facmod(N = 100, dedic = rep(1:3, each = 5))
mcmc <- befa(Y, Kmax = 5, iter = 1000)
mcmc <- post.column.switch(mcmc)


[Package BayesFM version 0.1.5 Index]