This function makes different plots that are useful to assess the posterior results: a trace plot of the number of latent factors (also showing Metropolis-Hastings acceptance across MCMC replications), a histogram of the posterior probabilities of the number of factors, heatmaps for the inficator probabilities, the factor loading matrix, and the correlation matrix of the latent factors.
Object of class 'befa'.
The following extra arguments can be specified:
This function makes graphs based on the summary results returned by
summary.befa. It therefore accepts the same optional arguments
as this function.
Rémi Piatek email@example.com
summary.befa to summarize posterior results.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
set.seed(6) # generate fake data with 15 manifest variables and 3 factors Y <- simul.dedic.facmod(N = 100, dedic = rep(1:3, each = 5)) # run MCMC sampler and post process output # notice: 1000 MCMC iterations for illustration purposes only, # increase this number to obtain reliable posterior results! mcmc <- befa(Y, Kmax = 5, iter = 1000) mcmc <- post.column.switch(mcmc) mcmc <- post.sign.switch(mcmc) # plot results for highest posterior probability model plot(mcmc, what = 'hppm')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.