/* * SPSS Syntax for Velicerīs Minimum Average Partial (MAP) Test * * 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). */. correlation x1 to x12 /matrix out('C:\data.cor') /missing = listwise. *factor var = var1 to var25 /matrix out(cor = 'C:\data.cor'). matrix. mget /type = corr /file = 'C:\data.cor'. call eigen(cr,eigvect,eigval). compute loadings = eigvect * sqrt(mdiag(eigval)). compute fm = make(nrow(cr),2,-9999). compute fm(1,2)=(mssq(cr)-ncol(cr)) / (ncol(cr) * (ncol(cr)-1))). loop #m = 1 to ncol(cr) - 1. compute a = loadings(:,1:#m). compute partcov = cr - (a*t(a)). compute d = mdiag (1/(sqrt(diag(partcov)))). compute pr = d*partcov * d. compute fm(#m+1,2)=(mssq(pr)-ncol(cr)) / (ncol(cr)*(ncol(cr)-1))). end loop. *identifying the smallest fm valur & its location (=the # of factors). compute minfm = fm(1,2). compute nfactors = 0. loop #s = 1 to nrow(fm). compute fm(#s,1) = #s - 1. do if(fm(#s,2) < minfm). compute minfm = fm(#s,2). compute nfactors = #s -1. end if. end loop. print eigval /title="Eigenvalue". print fm /title="Velicerīs Average Squared Correlations". print minfm /titl="The smallest average squared correlation is". print nfactors /title="The number of components is". end matrix.