* Velicer's Minimum Average Partial (MAP) Test. * DATA ========================================================>. * Open the SPSS data file and enter the variable names on the variables line, e.g. "Variables= q10_1 to Q10_13". Correlation Variables= v1 to v6 /matrix out (*) /missing = listwise. * ========================================================>. * PROGRAM STARTS HERE ========================================================>. set printback=none width=80 seed = 1953125. matrix. MGET /type= corr /file=* . 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 value & its location (= # 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 /title="Velicer's Minimum Average Partial (MAP) Test:". print eigval /title="Eigenvalues" /format "f12.6". print fm /title="Velicer's Average Squared Correlations"/format "f12.6". print minfm/title="The smallest average squared correlation is"/format "f12.6". print nfactors /title="The number of components is". end matrix. * PROGRAM ENDS HERE ========================================================>.