if (FALSE) {
# ....................................................................
# 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)
}
Run the code above in your browser using DataLab