+dnl PSPP - a program for statistical analysis.
+dnl Copyright (C) 2017 Free Software Foundation, Inc.
+dnl
+dnl This program is free software: you can redistribute it and/or modify
+dnl it under the terms of the GNU General Public License as published by
+dnl the Free Software Foundation, either version 3 of the License, or
+dnl (at your option) any later version.
+dnl
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+dnl GNU General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
+dnl
AT_BANNER([FACTOR procedure])
AT_SETUP([FACTOR extraction=paf method=correlation])
end data.
-missing values
+missing values
question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 (0).
factor
/variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24
+ /analysis all
/print univariate det correlation
/format blank(.30)
/plot eigen
Table: Correlation Matrix
,,question13,question14,question15,question16,question17,question18,question19,question20,question21,question22,question23,question24
-Correlations,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454
+Correlation,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454
,question14,.661,1.000,.635,.500,.552,.433,.320,.315,.449,.333,.565,.443
,question15,.600,.635,1.000,.505,.587,.457,.359,.356,.509,.369,.582,.435
,question16,.566,.500,.505,1.000,.586,.405,.335,.317,.452,.363,.459,.430
,question22,.333,.333,.369,.363,.450,.536,.484,.383,.507,1.000,.493,.444
,question23,.564,.565,.582,.459,.613,.569,.444,.410,.598,.493,1.000,.705
,question24,.454,.443,.435,.430,.521,.474,.374,.357,.500,.444,.705,1.000
-Determinant,.002,,,,,,,,,,,,
+Caption: Determinant: 0.00
Table: Factor Matrix
,Factor,,
question22,.613,,
question23,.819,,.345
question24,.695,,.386
-
+
Table: Rotated Factor Matrix
,Factor,,
,1,2,3
AT_CLEANUP
AT_SETUP([FACTOR extraction=pc method=correlation])
-dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm
+dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm
AT_DATA([factor2.sps],
[set format = F11.3.
end data.
factor
- /variables read write math science socst
+ /variables read write math science socst
+ /analysis read write math science socst
/extraction pc
/plot eigen
/criteria mineigen (.557)
Table: Total Variance Explained
,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,,
-Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
-1,3.381,67.616,67.616,3.381,67.616,67.616,2.113,42.267,42.267
-2,.557,11.148,78.764,.557,11.148,78.764,1.825,36.497,78.764
-3,.407,8.136,86.900,,,,,,
-4,.356,7.123,94.023,,,,,,
-5,.299,5.977,100.000,,,,,,
+,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,3.381,67.6%,67.6%,3.381,67.6%,67.6%,2.113,42.3%,42.3%
+2,.557,11.1%,78.8%,.557,11.1%,78.8%,1.825,36.5%,78.8%
+3,.407,8.1%,86.9%,,,,,,
+4,.356,7.1%,94.0%,,,,,,
+5,.299,6.0%,100.0%,,,,,,
Table: Component Matrix
,Component,
9 7 9 9 7
END DATA
+SET SMALL=0.
FACTOR /VARIABLES=TRAIT1 TO TRAIT5
/ROTATION=NOROTATE /* NOROTATE may have caused the problem. */
/EXTRACTION=PC
Table: Correlation Matrix
,,TRAIT1,TRAIT2,TRAIT3,TRAIT4,TRAIT5
-Correlations,TRAIT1,1.00,.30,.88,1.00,.54
-,TRAIT2,.30,1.00,-.02,.33,.84
-,TRAIT3,.88,-.02,1.00,.87,.13
-,TRAIT4,1.00,.33,.87,1.00,.54
-,TRAIT5,.54,.84,.13,.54,1.00
+Correlation,TRAIT1,1.000,.296,.881,.995,.545
+,TRAIT2,.296,1.000,-.022,.326,.837
+,TRAIT3,.881,-.022,1.000,.867,.130
+,TRAIT4,.995,.326,.867,1.000,.544
+,TRAIT5,.545,.837,.130,.544,1.000
Sig. (1-tailed),TRAIT1,,.260,.004,.000,.103
,TRAIT2,.260,,.482,.238,.009
,TRAIT3,.004,.482,,.006,.390
,TRAIT4,.000,.238,.006,,.103
,TRAIT5,.103,.009,.390,.103,
-Determinant,.00,,,,,
+Caption: Determinant: 0.00
Table: Communalities
,Initial,Extraction
Table: Total Variance Explained
,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
-Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
-1,3.26,65.26,65.26,3.26,65.26,65.26
-2,1.54,30.77,96.03,1.54,30.77,96.03
-3,.17,3.36,99.39,.17,3.36,99.39
-4,.03,.61,100.00,.03,.61,100.00
-5,.00,.00,100.00,,,
+,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,3.26,65.3%,65.3%,3.26,65.3%,65.3%
+2,1.54,30.8%,96.0%,1.54,30.8%,96.0%
+3,.17,3.4%,99.4%,.17,3.4%,99.4%
+4,.03,.6%,100.0%,.03,.6%,100.0%
+5,.00,.0%,100.0%,,,
Table: Component Matrix
,Component,,,
Table: Total Variance Explained
,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
-Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
-1,2.404,80.124,80.124,2.155,71.847,71.847
-2,.425,14.166,94.290,,,
-3,.171,5.710,100.000,,,
+,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,2.404,80.1%,80.1%,2.155,71.8%,71.8%
+2,.425,14.2%,94.3%,,,
+3,.171,5.7%,100.0%,,,
Table: Factor Matrix
,Factor
get file='llz.zsav'.
-factor
- /variables pz pn ps nz nn ns tz tn ts oz on os sz sn ss zz zn zs
- /missing listwise
- /print initial extraction rotation
- /criteria mineigen(1) iterate(25)
- /extraction paf
+factor
+ /variables pz pn ps nz nn ns tz tn ts oz on os sz sn ss zz zn zs
+ /missing listwise
+ /print initial extraction rotation
+ /criteria mineigen(1) iterate(25)
+ /extraction paf
/method correlation
/rotation promax (5).
])
ZS,.130,.158
Table: Total Variance Explained
-,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings
-Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total
-1,2.968,16.491,16.491,2.411,13.393,13.393,2.355
-2,2.026,11.253,27.744,1.271,7.059,20.452,1.209
-3,1.622,9.011,36.756,.948,5.264,25.716,1.231
-4,1.086,6.032,42.788,.283,1.574,27.290,.770
-5,.996,5.533,48.321,,,,
-6,.923,5.130,53.451,,,,
-7,.873,4.852,58.303,,,,
-8,.856,4.756,63.060,,,,
-9,.836,4.644,67.703,,,,
-10,.816,4.534,72.237,,,,
-11,.785,4.359,76.596,,,,
-12,.740,4.110,80.706,,,,
-13,.713,3.964,84.670,,,,
-14,.653,3.626,88.296,,,,
-15,.633,3.519,91.815,,,,
-16,.604,3.356,95.171,,,,
-17,.484,2.687,97.858,,,,
-18,.386,2.142,100.000,,,,
+,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,,
+,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,2.968,16.5%,16.5%,2.411,13.4%,13.4%,. ,. ,. @&t@
+2,2.026,11.3%,27.7%,1.271,7.1%,20.5%,. ,. ,-Infinity
+3,1.622,9.0%,36.8%,.948,5.3%,25.7%,. ,. ,-Infinity
+4,1.086,6.0%,42.8%,.283,1.6%,27.3%,. ,. ,-Infinity
+5,.996,5.5%,48.3%,,,,,,
+6,.923,5.1%,53.5%,,,,,,
+7,.873,4.9%,58.3%,,,,,,
+8,.856,4.8%,63.1%,,,,,,
+9,.836,4.6%,67.7%,,,,,,
+10,.816,4.5%,72.2%,,,,,,
+11,.785,4.4%,76.6%,,,,,,
+12,.740,4.1%,80.7%,,,,,,
+13,.713,4.0%,84.7%,,,,,,
+14,.653,3.6%,88.3%,,,,,,
+15,.633,3.5%,91.8%,,,,,,
+16,.604,3.4%,95.2%,,,,,,
+17,.484,2.7%,97.9%,,,,,,
+18,.386,2.1%,100.0%,,,,,,
Table: Factor Matrix
,Factor,,,
AT_CLEANUP
+
+
+
+
+
+
+AT_SETUP([FACTOR covariance matrix])
+
+AT_DATA([covariance-matrix.sps], [dnl
+set format = F10.3.
+matrix data
+ variables = rowtype_ var01 var02 var03 var04 var05 var06 var07 var08
+ / format = lower diagonal .
+begin data
+mean 24.3 5.4 69.7 20.1 13.4 2.7 27.9 3.7
+sd 5.7 1.5 23.5 5.8 2.8 4.5 5.4 1.5
+n 92 92 92 92 92 92 92 92
+cov 32.490000
+cov 1.539000 2.250000
+cov -29.469000 -5.992500 552.250000
+cov 11.901600 2.697000 -19.082000 33.640000
+cov 4.309200 0.672000 -7.896000 3.572800 7.840000
+cov 8.464500 1.012500 -17.977500 6.264000 2.646000 20.250000
+cov 15.390000 2.349000 -25.380000 10.022400 1.814400 9.234000 29.160000
+cov 1.453500 0.652500 -1.762500 1.740000 1.134000 1.350000 0.324000 2.250000
+end data.
+
+factor matrix in (cov = *)
+ / method = covariance
+ / print = initial covariance
+ / extraction = pc
+ / rotation = norotate.
+])
+
+AT_CHECK([pspp -O format=csv covariance-matrix.sps], [0], [dnl
+Table: Covariance Matrix
+,var01,var02,var03,var04,var05,var06,var07,var08
+var01,32.490,1.539,-29.469,11.902,4.309,8.464,15.390,1.454
+var02,1.539,2.250,-5.992,2.697,.672,1.013,2.349,.653
+var03,-29.469,-5.992,552.250,-19.082,-7.896,-17.977,-25.380,-1.763
+var04,11.902,2.697,-19.082,33.640,3.573,6.264,10.022,1.740
+var05,4.309,.672,-7.896,3.573,7.840,2.646,1.814,1.134
+var06,8.464,1.013,-17.977,6.264,2.646,20.250,9.234,1.350
+var07,15.390,2.349,-25.380,10.022,1.814,9.234,29.160,.324
+var08,1.454,.653,-1.763,1.740,1.134,1.350,.324,2.250
+
+Table: Communalities
+,Initial
+var01,32.490
+var02,2.250
+var03,552.250
+var04,33.640
+var05,7.840
+var06,20.250
+var07,29.160
+var08,2.250
+
+Table: Total Variance Explained
+,Initial Eigenvalues,,
+,Total,% of Variance,Cumulative %
+1,556.895,81.9%,81.9%
+2,57.963,8.5%,90.4%
+3,23.576,3.5%,93.9%
+4,16.446,2.4%,96.3%
+5,14.603,2.1%,98.4%
+6,6.831,1.0%,99.4%
+7,2.375,.3%,99.8%
+8,1.440,.2%,100.0%
+
+Table: Component Matrix
+,Component,,,,,,
+,1,2,3,4,5,6,7
+var01,1.394,4.388,1.513,-2.851,.849,.396,.033
+var02,.269,.460,-.173,.147,-.146,-.213,.872
+var03,-23.489,.725,.058,.003,.022,-.012,.006
+var04,.926,4.007,-4.068,.241,-.253,.218,-.026
+var05,.363,.829,-.172,-.255,.805,-2.492,.058
+var06,.843,2.354,.971,2.425,2.649,.392,.046
+var07,1.205,3.948,1.926,1.515,-2.450,-.317,-.087
+var08,.085,.319,-.157,-.011,.353,-.341,-.816
+])
+
+AT_CLEANUP
+
+
+
+dnl A more realistic example of factor analysis usage.
+AT_SETUP([FACTOR correlation matrix])
+
+AT_DATA([correlation-matrix.sps], [dnl
+set format = F10.3.
+
+matrix data
+ variables = rowtype_
+ cdi_actws_16 cdi_maxzin_16 rdls_passws_16 rdls_actws_16 cdi_actws_20 cdi_maxzin_20 cdi_actws_26 cdi_maxzin_26 rdls_passws_26 rdls_actws_26
+ nepsy_passws_36 morf_verv_36 bnt_actws_36 klankgr_id_36 snelnoe_36 letters_36 ppvt_passws_50 morf_verv_50
+ nepsy_passws_56 bnt_actws_56 klank_gr_weg_56 snelnoe_56 letters_56
+ leesacc_wo_owo_811 leesacc_tekst_811 leesacc_otekst_811 leessne_wo_owo_811 leesvl_tekst_811 leesvl_otekst_811 leessne_wo_811 spel_wo_owo_811
+ / format = upper diagonal .
+begin data
+mean 64.44 1.74 15.30 11.50 269.03 5.37 441.90 8.57 36.59 33.99 11.68 14.74 18.67 6.70 71.57 2.28 70.45 51.82 18.82 34.57 11.68 45.63 12.94 35.08 92.60 79.28 2.78 61.71 29.44 9.46 13.17
+sd 74.93 1.36 5.51 4.17 159.26 2.76 128.77 3.50 6.20 6.50 3.55 8.37 5.90 3.01 24.81 4.09 24.44 18.55 2.90 6.46 3.01 14.06 7.69 4.36 7.10 17.57 1.27 25.68 11.75 3.36 4.13
+n 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150 150
+corr 1.00 .784 .397 .862 .692 .625 .490 .374 .406 .371 .260 .257 .306 .118 -.148 .072 .202 .234 .198 .241 .205 -.054 .246 .166 .143 .155 -.122 .144 -.010 .135 .241
+corr 1.00 .333 .751 .549 .553 .447 .313 .304 .377 .204 .249 .258 .193 -.158 .119 .150 .216 .127 .209 .242 .046 .233 .120 .155 .107 -.126 .147 -.009 .134 .208
+corr 1.00 .469 .433 .381 .442 .307 .462 .391 .378 .293 .369 .191 -.306 .238 .204 .215 .295 .285 .157 .069 .241 .029 .060 .054 -.043 .124 -.069 .054 .136
+corr 1.00 .708 .663 .509 .419 .434 .432 .267 .255 .342 .132 -.192 .142 .228 .203 .248 .260 .200 -.051 .254 .136 .156 .109 -.126 .172 -.004 .157 .268
+corr 1.00 .787 .710 .567 .402 .511 .274 .285 .332 .154 -.096 .247 .253 .235 .245 .257 .261 -.048 .243 .119 .194 .164 -.108 .184 .011 .157 .235
+corr 1.00 .590 .646 .449 .505 .313 .322 .405 .148 -.117 .152 .294 .322 .252 .321 .267 -.055 .255 .118 .178 .137 -.110 .182 .004 .146 .216
+corr 1.00 .548 .343 .619 .296 .260 .456 .149 -.098 .252 .279 .267 .342 .361 .186 -.066 .215 .107 .148 .059 -.114 .156 -.035 .095 .220
+corr 1.00 .406 .509 .397 .236 .416 .037 -.179 .192 .334 .293 .277 .367 .162 -.150 .306 .171 .307 .173 -.128 .255 .075 .224 .315
+corr 1.00 .410 .497 .560 .574 .240 -.301 .204 .508 .351 .457 .428 .242 -.117 .367 .136 .191 .191 -.102 .215 .053 .185 .273
+corr 1.00 .328 .258 .534 .236 -.202 .200 .333 .209 .352 .375 .302 -.119 .272 .062 .203 .042 -.092 .220 .020 .158 .227
+corr 1.00 .439 .488 .323 -.213 .287 .507 .427 .493 .522 .298 -.142 .371 .109 .215 .213 -.048 .228 .009 .133 .267
+corr 1.00 .437 .381 -.158 .153 .403 .430 .383 .379 .150 -.141 .303 .115 .131 .155 -.170 .206 .039 .193 .254
+corr 1.00 .247 -.143 .182 .521 .364 .415 .688 .304 -.185 .327 .188 .211 .202 -.111 .272 .122 .226 .301
+corr 1.00 -.150 .229 .296 .249 .329 .255 .210 -.036 .252 .141 .230 .112 -.195 .309 .135 .250 .195
+corr 1.00 -.132 -.204 -.162 -.284 -.166 -.189 .294 -.339 -.094 -.218 -.144 .153 -.246 -.128 -.192 -.239
+corr 1.00 .151 .132 .166 .195 .387 -.214 .476 .154 .187 .167 -.236 .410 .316 .370 .245
+corr 1.00 .388 .479 .591 .294 -.171 .351 .102 .245 .180 .003 .274 .059 .178 .236
+corr 1.00 .408 .437 .276 -.153 .353 .251 .318 .229 -.111 .263 .042 .203 .349
+corr 1.00 .467 .234 -.249 .382 .199 .313 .197 -.117 .263 .047 .215 .318
+corr 1.00 .368 -.199 .441 .198 .224 .197 -.099 .329 .105 .256 .322
+corr 1.00 -.211 .473 .233 .253 .268 -.198 .397 .229 .309 .277
+corr 1.00 -.310 -.217 -.312 -.203 .227 -.296 -.260 -.276 -.321
+corr 1.00 .368 .350 .311 -.313 .578 .338 .521 .458
+corr 1.00 .415 .580 -.588 .545 .497 .635 .683
+corr 1.00 .570 -.386 .494 .340 .538 .524
+corr 1.00 -.366 .427 .299 .498 .506
+corr 1.00 -.684 -.620 -.746 -.568
+corr 1.00 .759 .900 .555
+corr 1.00 .814 .400
+corr 1.00 .621
+corr 1.00
+end data .
+
+factor matrix in (cor = *)
+ / analysis = cdi_actws_16 rdls_actws_16 cdi_actws_20 cdi_actws_26 rdls_actws_26 bnt_actws_36 bnt_actws_56
+ / format = default
+ / criteria = factors (1)
+ / extraction = pc
+ / rotation = norotate
+ / print = initial extraction .
+
+])
+
+AT_CHECK([pspp -O format=csv correlation-matrix.sps], [0], [dnl
+Table: Communalities
+,Initial,Extraction
+cdi_actws_16,1.000,.614
+rdls_actws_16,1.000,.660
+cdi_actws_20,1.000,.695
+cdi_actws_26,1.000,.650
+rdls_actws_26,1.000,.536
+bnt_actws_36,1.000,.443
+bnt_actws_56,1.000,.316
+
+Table: Total Variance Explained
+,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
+,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
+1,3.914,55.9%,55.9%,3.914,55.9%,55.9%
+2,1.320,18.9%,74.8%,,,
+3,.716,10.2%,85.0%,,,
+4,.422,6.0%,91.0%,,,
+5,.278,4.0%,95.0%,,,
+6,.216,3.1%,98.1%,,,
+7,.135,1.9%,100.0%,,,
+
+Table: Component Matrix
+,Component
+,1
+cdi_actws_16,.784
+rdls_actws_16,.812
+cdi_actws_20,.834
+cdi_actws_26,.806
+rdls_actws_26,.732
+bnt_actws_36,.666
+bnt_actws_56,.562
+])
+
+AT_CLEANUP
+
+
+AT_SETUP([FACTOR bad input])
+
+dnl Test for a crash
+AT_DATA([bad-input.sps], [dnl
+set format = F10.3.
+MATRIX DATA VARIABLES S1 ROWTYPE_ V1 TO V3 /SPLIT=S1.
+BEGIN DATA
+0 MEAN 2 4 3
+0 SD 1 2 3
+0 N 9 9 9
+0 KORR 1
+0 CORV .6 1
+0 CORR .7 .8 1
+1 MEAN 9 8 7
+1 SD 5 6 7
+1 N 9 9 9
+1 CORR 1
+X CORR .4 1
+1 CORR .3 .2 1
+END DATA.
+
+EXECUTE.
+
+FACTOR MATRIX IN (CORR =!*)
+ /PRINT = CORRELATION
+ .
+])
+
+AT_CHECK([pspp -O format=csv bad-input.sps], [1], [ignore])
+
+AT_CLEANUP
+
+
+AT_SETUP([FACTOR anti-image matrix])
+
+AT_DATA([anti-image-matrix.sps], [dnl
+SET FORMAT=F20.3 .
+matrix data
+ variables = rowtype_ viq piq pa ran piatwr piatc
+ / n = 476
+ / format = lower diagonal .
+begin data
+mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85
+sd 10.97 11.19 1.19 0.88 0.85 0.97
+corr 1.00
+corr 0.38 1.00
+corr 0.26 0.24 1.00
+corr 0.16 0.17 0.34 1.00
+corr 0.25 0.07 0.46 0.38 1.00
+corr 0.37 0.22 0.39 0.30 0.59 1.00
+end data.
+
+factor matrix = in (cor = *)
+ / analysis = viq piq pa ran piatwr piatc
+ / format = sort
+ / extraction = pc
+ / rotation = norotate
+ / print = aic
+])
+
+AT_CHECK([pspp -O format=csv anti-image-matrix.sps], [0], [dnl
+Table: Anti-Image Matrices
+,,viq,piq,pa,ran,piatwr,piatc
+Anti-image Covariance,viq,.762,-.248,-.048,.008,-.031,-.143
+,piq,-.248,.807,-.117,-.081,.108,-.071
+,pa,-.048,-.117,.711,-.125,-.173,-.060
+,ran,.008,-.081,-.125,.808,-.143,-.035
+,piatwr,-.031,.108,-.173,-.143,.551,-.265
+,piatc,-.143,-.071,-.060,-.035,-.265,.581
+Anti-image Correlation,viq,.741,-.316,-.066,.011,-.048,-.215
+,piq,-.316,.624,-.154,-.100,.163,-.103
+,pa,-.066,-.154,.811,-.165,-.277,-.093
+,ran,.011,-.100,-.165,.825,-.214,-.051
+,piatwr,-.048,.163,-.277,-.214,.675,-.469
+,piatc,-.215,-.103,-.093,-.051,-.469,.729
+
+Table: Component Matrix
+,Component,,,,
+,1,2,3,4,5
+piatc,.774,.122,-.368,.365,-.322
+piatwr,.754,.418,.442,.219,-.115
+pa,.707,.124,-.117,-.161,.256
+piq,.456,-.733,.122,-.289,-.377
+viq,.589,-.539,.033,.298,.457
+ran,.592,.262,-.069,-.638,.096
+])
+
+AT_CLEANUP
+
+
+AT_SETUP([FACTOR Kaiser-Meyer-Olkin])
+
+AT_DATA([kmo.sps], [dnl
+SET FORMAT=F20.3 .
+matrix data
+ variables = rowtype_ viq piq pa ran piatwr piatc
+ / n = 476
+ / format = lower diagonal .
+begin data
+mean 96.88 100.51 -1.73 -0.94 -2.52 -1.85
+sd 10.97 11.19 1.19 0.88 0.85 0.97
+corr 1.00
+corr 0.38 1.00
+corr 0.26 0.24 1.00
+corr 0.16 0.17 0.34 1.00
+corr 0.25 0.07 0.46 0.38 1.00
+corr 0.37 0.22 0.39 0.30 0.59 1.00
+end data.
+
+factor matrix = in (cor = *)
+ / analysis = viq piq pa ran piatwr piatc
+ / extraction = pc
+ / rotation = norotate
+ / print = kmo
+])
+
+AT_CHECK([pspp -O format=csv kmo.sps], [0], [dnl
+Table: KMO and Bartlett's Test
+Kaiser-Meyer-Olkin Measure of Sampling Adequacy,,.730
+Bartlett's Test of Sphericity,Approx. Chi-Square,602.673
+,df,15
+,Sig.,.000
+
+Table: Component Matrix
+,Component,,,,
+,1,2,3,4,5
+viq,.589,-.539,.033,.298,.457
+piq,.456,-.733,.122,-.289,-.377
+pa,.707,.124,-.117,-.161,.256
+ran,.592,.262,-.069,-.638,.096
+piatwr,.754,.418,.442,.219,-.115
+piatc,.774,.122,-.368,.365,-.322
+])
+
+AT_CLEANUP