View source: R/factorRotations.R
rsp_full_sa | R Documentation |
Rotation-Sign-Permutation (RSP) algorithm (Full Simulated Annealing).
rsp_full_sa(lambda_mcmc, maxIter = 1000, threshold = 1e-06, verbose = TRUE, sa_loops, rotate = TRUE, increaseIter = FALSE, temperatureSchedule = NULL, printIter = 1000)
lambda_mcmc |
Input matrix containing a MCMC sample of factor loadings. The column names should read as 'LambdaV1_1',..., 'LambdaV1_q', ..., 'LambdaVp_1',..., 'LambdaVp_q', where p and q correspond to the number of variables and factors, respectively. |
maxIter |
Maximum number of iterations of the RSP algorithm. Default: 1000. |
threshold |
Positive threshold for declaring convergence. The actual convergence criterion is |
verbose |
Logical value indicating whether to print intermediate output or not. |
sa_loops |
Number of simulated annealing loops per MCMC draw. |
rotate |
Logical. Default: TRUE. |
increaseIter |
Logical. |
temperatureSchedule |
Single valued function describing the temperature cooling schedule for the simulated annealing loops. |
printIter |
Print the progress of the algorithm when processing |
If necessary, more details than the description above.
lambda_reordered_mcmc |
Post-processed MCMC sample of factor loadings. |
sign_vectors |
The final sign-vectors. |
permute_vectors |
The final permutations. |
lambda_hat |
The resulting average of the post-processed MCMC sample of factor loadings. |
objective_function |
A two-column matrix containing the time-to-reach and the value of the objective function for each iteration. |
Panagiotis Papastamoulis
Papastamoulis, P. and Ntzoufras, I. (2020). On the identifiability of Bayesian Factor Analytic models. arXiv:2004.05105 [stat.ME].
# load small mcmc sample of 100 iterations # with p=6 variables and q=2 factors. data(small_posterior_2chains) # post-process it reorderedPosterior <- rsp_partial_sa( lambda_mcmc = small_posterior_2chains[[1]], sa_loops=5) # sa_loops should be larger in general # summarize the post-processed MCMC sample with coda summary(reorderedPosterior$lambda_reordered_mcmc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.