/* * SPSS Syntax for Hornīs Parallel Analyses. * * Quelle: OīConnor, B. P. (2000). * SPSS and SAS Programs for Determining the Number of Components Using Parallel Analysis and Velicerīs MAP Test. * Behavior Research Methods, Instruments & Computers, 32, 396-402. * Online im Internet: http://flash.lakeheadu.ca/~jljamies/Nfactors.pdf (2004-12-08). */. set mxloops=9000 length=none printback=none width=80 seed=1953125. matrix. *enter your specifications here. compute Ncases = 30. compute Nvars = 12. compute Ndatsets = 100. compute percent = 95. *computing random data correlation matrices & eigenvalues. compute evals = make(nvars,ndatsets,-9999). compute nm1 = 1 / (ncases-1). loop #nds = 1 to ndatsets. compute x = sqrt(2 * (ln(uniform(ncases,nvars)) * -1)) &* cos(6.283185 * uniform(ncases,nvars)). compute vcv = nm1 * (sscp(x)-((t(csum(x))*csum(x))/ncases)). compute d = inv(mdiag(sqrt(diag(vcv)))). compute evals(:,#nds) = eval(d*vcv*d). end loop. *identifying the eigenvalues corresponding to the desired percentile. compute num = rnd((percent*ndatsets)/100). compute results = {t(1:nvars),t(1:nvars),t(1:nvars)}. loop #root = 1 to nvars. compute ranks = rnkorder(evals(#root,:)). loop #col = 1 to ndatsets. do if (ranks(1,#col) = num). compute results(#root,3) = evals(#root, #col). break. end if. end loop. end loop. compute results(:,2) = rsum(evals)/ndatsets. compute specifs = {ncases;nvars;ndatsets;percent}. print specifs /title="Specifications for this Run:" /rlabels = "Ncases" "Nvars" "Ndatsets" "Percent". print results /title = "Random Data Eigenvalues" /clabels = "Root" "Means" "Prcntyl". end matrix.