R: Simulation Study from Given Factor Structure Matrices and...
studySim
R Documentation
Simulation Study from Given Factor Structure Matrices and Conditions
Description
The structureSim function returns statistical results from simulations
from predefined congeneric factor structures. The main ideas come from the
methodology applied by Zwick and Velicer (1986).
Zwick, W. R. and Velicer, W. F. (1986). Comparison of five rules for
determining the number of components to retain. Psychological Bulletin, 99, 432-442.
See Also
generateStructure,
structureSim
Examples
## Not run:
# ....................................................................
# Example inspired from Zwick and Velicer (1986)
# Very long computimg time
# ...................................................................
# 1. Initialisation
# reppar <- 30
# repsim <- 5
# quantile <- 0.50
# 2. Simulations
# X <- studySim(var=36,nFactors=3, pmjc=c(6,12), loadings=c(0.5,0.8),
# unique=c(0,0.2), quantile=quantile,
# N=c(72,180), repsim=repsim, reppar=reppar,
# stats=c(1:6))
# 3. Results (first 10 results)
# print(X[1:10,1:14],2)
# names(X)
# 4. Study of the error done in the determination of the number
# of components/factors. A positive value is associated to over
# determination.
# results <- X[X$stats=="mean",]
# residuals <- results[,c(11:25)] - X$nfactors
# BY <- c("nsubjects","var","loadings")
# round(aggregate(residuals, by=results[BY], mean),0)
## End(Not run)