Description Usage Arguments Value References Examples
PEFA
is a partially exploratory approach to factor analysis, which can incorporate
partial knowledge together with unknown number of factors, using bilevel Bayesian regularization.
When partial knowledge is not needed, it reduces to the fully exploratory factor analysis (FEFA
; Chen, 2021).
A large number of factors can be imposed for selection where true factors will be identified against spurious factors.
The loading vector is reparameterized to tackle model sparsity at the factor and loading levels
with the multivariate spike and slab priors. Parameters are obtained by sampling from the posterior
distributions with the Markov chain Monte Carlo (MCMC) techniques. The estimation results can be summarized
with summary.lawbl
and the trace or density of the posterior can be plotted with plot_lawbl
.
1 2 3 4 5 6 7 8 9 10 11 12 13 
dat 
A N \times J data matrix or data.frame consisting of the responses of N individuals to J items. 
Q 
A J \times K design matrix for the loading pattern with K factors and J items for 
K 
Maximum number of factors for selection under 
mjf 
Minimum number of items per factor. 
PPMC 
logical; 
burn 
Number of burnin iterations before posterior sampling. 
iter 
Number of formal iterations for posterior sampling (> 0). 
update 
Number of iterations to update the sampling information. 
rseed 
An integer for the random seed. 
digits 
Number of significant digits to print when printing numeric values. 
verbose 
logical; to display the sampling information every

pcfa
returns an object of class lawbl
without item intercepts. It contains a lot of information about
the posteriors that can be summarized using summary.lawbl
.
Chen, J. (2021). A Bayesian regularized approach to exploratory factor analysis in one step. Structural Equation Modeling: A Multidisciplinary Journal. DOI: 10.1080/10705511.2020.1854763.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27  #####################################################
# Example 1: Fully EFA #
#####################################################
dat < sim18cfa0$dat
m0 < pefa(dat = dat, K=5, burn = 2000, iter = 2000,verbose = TRUE)
summary(m0) # summarize basic information
summary(m0, what = 'qlambda') #summarize significant loadings in pattern/Qmatrix format
summary(m0, what = 'phi') #summarize factorial correlations
summary(m0, what = 'eigen') #summarize factorial eigenvalue
##########################################################
# Example 2: PEFA with two factors partially specified #
##########################################################
J < ncol(dat)
K < 5
Q<matrix(1,J,K);
Q[1:2,1]<Q[7:8,2]<1
Q
m1 < pefa(dat = dat, Q = Q,burn = 2000, iter = 2000,verbose = TRUE)
summary(m1)
summary(m1, what = 'qlambda')
summary(m1, what = 'phi')
summary(m1,what='eigen')

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.