genPhi | R Documentation |
Create a random Phi matrix with maximum factor correlation.
genPhi(NFac, EigenValPower = 6, MaxAbsPhi = 0.5)
NFac |
Number of factors. |
EigenValPower |
(Scalar > 1) A scalar than controls the positive skewness of the distribution of eigenvalues of Phi. |
MaxAbsPhi |
(Scaler in [0,1]) The maximum off diagonal of Phi (the factor correlation matrix). |
A factor correlation matrix. Note that the returned matrix is not guaranteed to be positive definite. However, a PD check is performed in simFA so that simFA always produces a PD Phi matrix.
Niels Waller
NFac <- 5
par(mfrow=c(2,2))
for(i in 1:4){
R <- genPhi(NFac,
EigenValPower = 6,
MaxAbsPhi = 0.5)
L <- eigen(R)$values
plot(1:NFac, L,
type="b",
ylab = "Eigenvalues of Phi",
xlab = "Dimensions",
ylim=c(0,L[1]+.5))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.