Add copyright and licence notices to files which lack them.
[pspp] / tests / language / stats / factor.at
1 dnl PSPP - a program for statistical analysis.
2 dnl Copyright (C) 2017 Free Software Foundation, Inc.
3 dnl 
4 dnl This program is free software: you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation, either version 3 of the License, or
7 dnl (at your option) any later version.
8 dnl 
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl 
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 dnl AT_BANNER([FACTOR procedure])
17
18 AT_SETUP([FACTOR extraction=paf method=correlation])
19 dnl This example is based on data from http://www.ats.ucla.edu/stat/Spss/output/factor1.htm
20
21 AT_DATA([factor.sps],
22   [set format = F11.3.
23
24 data list notable fixed /question13 to question24 1-12.
25 begin data.
26 555555535543
27 544453434443
28 545555544444
29 444442444433
30 554545554554
31 554455454455
32 555554555244
33 554455544443
34 555554434344
35 544454544344
36 555545555555
37 555454544455
38 555445544455
39 455544443343
40 544454344344
41 555555555455
42 555554454455
43 555555554445
44 555555554555
45 545534553343
46 555555535554
47 555544444445
48 545544334433
49 554555434443
50 555555544454
51 555445545453
52 555554434244
53 444444433233
54 545555454443
55 554443434243
56 444534334333
57 454534444332
58 555455353444
59 555544443243
60 555554543243
61 555544444343
62 445444434443
63 555555555544
64 444444434340
65 455044434334
66 555555533433
67 554554535040
68 434533334232
69 443232444432
70 555555555555
71 555555554544
72 555544444445
73 444224343344
74 444554454355
75 444434332433
76 555555555555
77 043243432433
78 444443334333
79 453443433434
80 443342332232
81 554434434533
82 444344434443
83 444444434443
84 554552434133
85 453334332432
86 444445554444
87 431232332223
88 555555555544
89 544445543443
90 444455535543
91 444444444433
92 444444543243
93 555431443333
94 444443433433
95 444433433443
96 454334444433
97 111111111544
98 444423442433
99 555443333353
100 555543334344
101 055454400000
102 555454444355
103 555555555555
104 055544533333
105 555554555554
106 555555535554
107 555555545355
108 555555555455
109 555544545543
110 555554404455
111 555454435454
112 555555535554
113 555555555555
114 555443433544
115 555554435454
116 555555545344
117 555555535454
118 555445535453
119 444444333544
120 555554434444
121 455454434454
122 555555535555
123 554545534455
124 555555555443
125 454443434444
126 555553334444
127 555554545454
128 555555555555
129 555554554454
130 555555555555
131 544545534544
132 555555534454
133 555555555455
134 555554535544
135 555555535555
136 555451234443
137 555444444544
138 555544434354
139 555545533444
140 555554534443
141 545554434554
142 554433444433
143 544432233524
144 411111111111
145 445423442233
146 555543433344
147 444443342233
148 555555534455
149 545442434223
150 554553352333
151 544554554445
152 555555435455
153 444334304234
154 455453444434
155 444443443245
156 555552232132
157 555434324345
158 544444434344
159 534344344444
160 445555555344
161 444343442132
162 444444434344
163 444444554334
164 444545444333
165 434442343224
166 443443433233
167 555551555554
168 544544434444
169 454544434433
170 555555535434
171 555555555555
172 455544444444
173 454444434233
174 555555544344
175 454445544445
176 444444554434
177 555455455443
178 555454425444
179 444454434443
180 544443433233
181 444543434433
182 555553545354
183 544444444433
184 444445434433
185 555533353333
186 555434234333
187 444314222411
188 555555555555
189 455545534443
190 455045534433
191 555545444444
192 455544243543
193 444421113343
194 554444534444
195 555555544554
196 555334434452
197 555544543455
198 555554434554
199 555445554454
200 555555545344
201 555555555555
202 554543334245
203 554441233333
204 555554334545
205 555555535544
206 555555554554
207 555445444543
208 444424544432
209 444425544333
210 555434344443
211 555533233223
212 544433442343
213 555555555555
214 555445452234
215 555444555444
216 555444544455
217 555544354554
218 545445555555
219 555555555555
220 455443342232
221 555555544454
222 455534443455
223 555555555055
224 444554333244
225 444445434543
226 555554544455
227 444443444434
228 444444434445
229 334231314323
230 444444434433
231 555554444443
232 444444434443
233 555455434444
234 444444444444
235 555455435455
236 444444434344
237 444543433232
238 544443334454
239 555544433244
240 534443324224
241 555555544444
242 444443434444
243 555553444344
244 443434443333
245 444444434333
246 554445444343
247 444443344434
248 445555544543
249 555554443443
250 322232403322
251 444444444433
252 444445444443
253 444454534445
254 544344444344
255 554445534544
256 555555555554
257 555544432333
258 444444444443
259 555555555554
260 455555555554
261 555555555543
262 555555555544
263 555554445555
264 444335544455
265 555555555555
266 555454444454
267 555455544454
268 444445444444
269 555555555555
270 555455454554
271 555454544554
272 555555555455
273 555555554444
274 444444544434
275 334334443333
276 422224222211
277 121512011111
278 443444432332
279 434335533344
280 444443543433
281 554454443453
282 555555545454
283 555555555344
284 555555555554
285 555555334555
286 454445554444
287 454545534444
288 555554555444
289 455444534455
290 555544554544
291 444444444444
292 555424423133
293 222433443224
294 544544532344
295 545554544544
296 555532544144
297 444432343433
298 434545554545
299 444344505443
300 555555555544
301 555554555344
302 444531113112
303 555554333133
304 455433233233
305 354354434345
306 454534433433
307 433112332321
308 555445433333
309 454343434143
310 555554445555
311 455423334322
312 443333332222
313 444443444443
314 553432224134
315 444223432233
316 454324425444
317 344434514443
318 555552415255
319 354332543353
320 444531333233
321 443433334133
322 444444444433
323 444444445533
324 445133212223
325 343433432213
326 442333333332
327 345455535244
328 443211121122
329 555445444444
330 555555544344
331 453243332232
332 443543422533
333 554444434344
334 554444333444
335 555555335343
336 444231121133
337 454433332233
338 455524434244
339 554433224354
340 555455555444
341 454444424444
342 554242232134
343 555553315443
344 555553333454
345 455421434211
346 111111151111
347 454443203123
348 454243334132
349 355332213144
350 554534334134
351 555543434355
352 555543433255
353 444441223334
354 555443143255
355 444444444454
356 444442323544
357 454443434343
358 445453434444
359 454455554433
360 554532342234
361 444442243233
362 444442343334
363 555443433444
364 555543253444
365 554554444455
366 555543355344
367 555444445444
368 434443204222
369 444432444234
370 222142441111
371 111111141111
372 334334454433
373 555354552543
374 433411122112
375 455534504444
376 543211224233
377 344333332532
378 344443233333
379 444424432434
380 555555544454
381 555555554544
382 555444444444
383 555443533443
384 555554544344
385 555554444444
386 544543433343
387 444445434444
388 555555555555
389 555443333233
390 545444534454
391 555454434343
392 555453434544
393 544334444333
394 555443443444
395 555555534544
396 444444444433
397 555543433343
398 555444445334
399 555543442433
400 455444334443
401 554443434443
402 555254500544
403 555444433344
404 555555535544
405 444443532232
406 544443433433
407 555555535544
408 555455454444
409 555455445544
410 544444534433
411 555555555554
412 555553533444
413 555555555554
414 555554434343
415 555455544443
416 555554444443
417 555454444445
418 333222333223
419 444443544233
420 543443534433
421 555545454533
422 444444404033
423 455454504543
424 455555555454
425 454443344343
426 555553435244
427 555543544444
428 555553343044
429 444443444433
430 445543434434
431 555554433545
432 555554455445
433 455553333234
434 555552344243
435 444141212213
436 444443504234
437 445544253444
438 555554354555
439 534552234543
440 555554544544
441 444233404224
442 555554534444
443 444443444344
444 422442434324
445 554434434344
446 444444434334
447 443433432444
448 555454435344
449 252423332214
450 454544434434
451 444444444244
452 555554544445
453 443222432333
454 555544444332
455 545555543445
456 554544334444
457 555445555544
458 554343434433
459 555555535554
460 444554444333
461 553544343534
462 555553254433
463 555555554554
464 544443443344
465 555443444344
466 544432144123
467 555555555555
468 555555555354
469 555555535545
470 455454434444
471 455455534445
472 455555554455
473 555553545445
474 445545544444
475 545345553555
476 444445444433
477 443435433433
478 555554545353
479 444443232223
480 444444434433
481 555555545454
482 555554444343
483 555554444443
484 434544333422
485 444443434343
486 555555455443
487 555544434343
488 455545534444
489 555555555553
490 444443343434
491 555555555445
492 433444444434
493 344221512132
494 333421132223
495 333444443444
496 435544545533
497 444335544443
498 333323223323
499 334434332333
500 444422323213
501 324433443423
502 555555554555
503 555452424444
504 555544434444
505 555544443343
506 555445545453
507 555555344453
508 555544545550
509 454443434334
510 444332233344
511 555554332344
512 554444433444
513 555554555554
514 555555543544
515 444442443132
516 555555545555
517 544553435533
518 044044444444
519 444443434533
520 555454433434
521 555555555454
522 555555555555
523 454544434444
524 444444434333
525 554555455554
526 555555543444
527 423331124132
528 445445534455
529 555555555554
530 444535554434
531 555555555554
532 354443422232
533 555545535443
534 555555555555
535 555455444453
536 455434443333
537 455444443233
538 343322434411
539 555555555534
540 453442432333
541 445554434544
542 345444443333
543 454554554355
544 444434453434
545 555555454443
546 555443343341
547 545553343433
548 222343222201
549 444433434443
550 535555555544
551 552541442423
552 545433343334
553 455445433443
554 444444433433
555 455543343433
556 434444432333
557 444545444444
558 555554534444
559 452444434433
560 454443432533
561 555453334433
562 444442233432
563 555555553433
564 545555545445
565 335543222333
566 554554344445
567 243424442212
568 133222432411
569 343434534233
570 222222212211
571 445455554434
572 455554453344
573 223334424434
574 555355555544
575 455544554434
576 544455555444
577 444444444444
578 444444444344
579 444334444444
580 444444444434
581 555455534243
582 555555545555
583 555555555555
584 444443534343
585 555554544444
586 555555555454
587 444434433433
588 455445544444
589 555544544455
590 444333433333
591 455443445343
592 444432442444
593 443334451543
594 555554455555
595 555444444444
596 555555555455
597 555555555554
598 555454345154
599 555555555555
600 555555555455
601 555554454544
602 454444454544
603 554443334544
604 455555402535
605 555554531534
606 455545544554
607 444423444223
608 555444334533
609 455554445243
610 453444334344
611 555555555554
612 555555555455
613 555555555554
614 455443334344
615 555555253555
616 555554433454
617 555444344455
618 550030034433
619 555444233343
620 555343222133
621 555555555554
622 555555243243
623 555555555355
624 555554345555
625 555443434454
626 545543133133
627 555443334154
628 444444344454
629 555555242254
630 555554444344
631 545443334454
632 554444132454
633 555455143154
634 555554453044
635 555555555455
636 555534335454
637 555555245555
638 545543333444
639 555555355454
640 555353145133
641 555553043454
642 555555354554
643 555543434454
644 555444324454
645 444444203443
646 555552233355
647 555555445455
648 555500034354
649 555354354444
650 555555555555
651 555543334144
652 555555005254
653 454444344254
654 555555555554
655 555555555255
656 555555555455
657 444444242243
658 555554445154
659 444444234333
660 555555553455
661 444422224243
662 555545443344
663 545552133143
664 555455044344
665 555555455555
666 555555545454
667 454433343144
668 555555555555
669 555455255155
670 555555454455
671 555555424455
672 555555355555
673 555444444455
674 555555454455
675 544411211314
676 223322441123
677 444223434233
678 444441121232
679 555555535555
680 454445533444
681 434442434433
682 545355554454
683 555542544333
684 445545555444
685 321000001011
686 444444444444
687 333223321322
688 444232433233
689 425432523122
690 455555555544
691 555555545555
692 555555534354
693 554554444243
694 555554343443
695 444443434333
696 555224252443
697 555544433433
698 344544434423
699 555554434344
700 555542134233
701 444344434444
702 445443433233
703 455343333434
704 455443333445
705 355344434433
706 234234433333
707 445444444445
708 455535535545
709 443423234443
710 455544334544
711 345441333323
712 445444533433
713 455554443355
714 445444433243
715 455454453444
716 444244444444
717 554244544154
718 555555555555
719 454343444444
720 555444444344
721 545455534454
722 555555555555
723 555554534454
724 555254555444
725 544354544453
726 553454534445
727 555454445355
728 545253554454
729 433342322233
730 544444444443
731 555455445544
732 424322433233
733 444424222233
734 555355555544
735 000000000000
736 555455345344
737 000055505450
738 434333444333
739 444445444444
740 555555555545
741 555554455545
742 555455435533
743 544544444243
744 444331232323
745 555555554444
746 443332323233
747 444224342433
748 555555555544
749 433443342333
750 555445504554
751 555545555544
752 555555535555
753 555555535345
754 454443433333
755 555444444555
756 444443232435
757 555433444443
758 555443434543
759 555555535555
760 555555533544
761 555543234444
762 433432332221
763 443433544233
764 443443333334
765 444424433444
766 552444333123
767 233332232211
768 223422221122
769 434433414133
770 332323333102
771 552544223222
772 542423343232
773 555552534132
774 455554544134
775 433523533132
776 433333433433
777 435434543333
778 434553433444
779 555544434345
780 443543443433
781 555555542344
782 544444553144
783 555544544243
784 535443441342
785 344555444333
786 444444443333
787 443443433432
788 545554534544
789 443533433433
790 333443432223
791 333333433123
792 322432122213
793 555555555555
794 554555444433
795 444543443234
796 444444433433
797 452555534433
798 244444444233
799 433442422232
800 555555535555
801 555555554455
802 555554545244
803 555555355455
804 555555555555
805 555555555555
806 444433323233
807 555455455455
808 434445444433
809 555554444455
810 454444543445
811 555555535455
812 555545554455
813 555555555555
814 555555555555
815 555443344353
816 455543304132
817 444443444433
818 555555555355
819 434433443333
820 444434444433
821 444444444433
822 555555555555
823 445553443323
824 445444444444
825 555554444054
826 455555554543
827 555555535555
828 555554445454
829 555444444443
830 555555555454
831 555554344455
832 555555454454
833 554444444454
834 555555555353
835 555545544454
836 553545332223
837 444424444332
838 545555543433
839 555444433444
840 555555444445
841 444444424433
842 444444543434
843 124113531311
844 555554534543
845 555343333333
846 545444544344
847 555444534444
848 555544543444
849 555455544443
850 444324402121
851 555554534544
852 555455544444
853 555555544454
854 444334404433
855 555443534444
856 555545554444
857 555555555555
858 455333233433
859 455444433433
860 455444444444
861 444235442443
862 555443343433
863 444445453444
864 454345453432
865 555555453444
866 344433322323
867 444443444244
868 444442343133
869 554445432233
870 555555544444
871 555555534444
872 555554455554
873 454443334244
874 544443333233
875 444445534445
876 444432134121
877 555555332243
878 555555544433
879 555554434444
880 454543534233
881 454432432343
882 444424432433
883 545553335344
884 555443434344
885 454443433333
886 555553534444
887 554544434355
888 552532421235
889 454543433434
890 544544343234
891 555552334125
892 555543455555
893 443442334222
894 554443444344
895 555554543334
896 555552342444
897 554443433333
898 443444434445
899 555554533344
900 442412242121
901 454543343244
902 445554433344
903 444443333433
904 444443433333
905 444433333334
906 444444334444
907 432321102223
908 444444434443
909 444444434343
910 454531432331
911 445543433434
912 554554434554
913 334253232333
914 444443434244
915 444433443234
916 444433334334
917 444443433333
918 553434303222
919 454443434244
920 444445544444
921 443441133433
922 444432232133
923 444444404344
924 444444333243
925 455543124243
926 555544532344
927 444432333132
928 554553434244
929 454443443333
930 433111121111
931 555555555544
932 444432433222
933 444443433233
934 443332332133
935 445344453243
936 444444405434
937 554554434343
938 455344534443
939 444444400434
940 444444344344
941 544554533443
942 555554443455
943 555555544544
944 555554534444
945 323123232311
946 444344344443
947 555554555544
948 343323332333
949 444443434444
950 444442214340
951 555434434444
952 455543343444
953 445432434433
954 455553434455
955 243321332322
956 444422332332
957 555533454444
958 555544443433
959 354422431422
960 333322421211
961 444443432434
962 344422431322
963 333342222321
964 444443454433
965 443443444433
966 553434531334
967 554434552343
968 545455553544
969 554455554443
970 555555555533
971 555555554543
972 454454544433
973 555444532143
974 554545544443
975 444233442434
976 544444434234
977 554344432233
978 555345533355
979 554554544433
980 455444444344
981 555554554554
982 555554545555
983 444433534434
984 444444421134
985 334333333333
986 334443443343
987 122333441413
988 434444333333
989 444344433233
990 444333332143
991 555154344133
992 324344333223
993 244444402233
994 454443433543
995 444344433344
996 455555445555
997 555555544433
998 454544434443
999 344535554533
1000 333435443433
1001 444444554544
1002 343434443333
1003 544553544455
1004 555444444455
1005 244333332222
1006 333441232233
1007 544433433433
1008 555544343344
1009 344211142124
1010 442442232113
1011 433432332223
1012 333424322222
1013 444443333233
1014 344321232223
1015 442434342422
1016 545555535555
1017 455454434454
1018 455355544444
1019 454444444445
1020 555554432430
1021 555444344144
1022 455534342234
1023 555555554354
1024 213332443111
1025 555545434433
1026 555554424444
1027 443434443433
1028 555555554443
1029 555555555544
1030 435535554433
1031 555455545443
1032 555555554533
1033 554545443455
1034 555553333233
1035 434432232323
1036 443443333433
1037 443544231534
1038 434533334334
1039 555555535544
1040 555544444445
1041 555555555555
1042 555555555555
1043 555555555555
1044 555555555555
1045 544555544544
1046 555555545555
1047 545555534354
1048 445444344344
1049 555555555555
1050 444443343334
1051 555444440000
1052 555555555554
1053 555555545455
1054 454434444345
1055 555445544443
1056 555554535433
1057 454445555555
1058 555444444355
1059 555555555555
1060 555555555555
1061 555555555555
1062 555555554555
1063 555455554455
1064 454435544255
1065 545543342243
1066 555544355345
1067 555555455354
1068 435553244333
1069 555555443454
1070 444444433445
1071 121422433111
1072 555554543244
1073 555444554444
1074 444203444433
1075 344342553322
1076 554445554344
1077 545445454454
1078 444245504233
1079 334335555533
1080 554355544444
1081 444445545444
1082 555555555344
1083 454544543233
1084 444455532434
1085 555544354243
1086 535444554433
1087 444444444444
1088 455555553243
1089 244442343235
1090 554544504043
1091 444435553433
1092 455553434354
1093 555444343314
1094 555553344453
1095 555555555544
1096 544444444433
1097 434434550033
1098 555455544444
1099 455445534344
1100 454445444554
1101 555555555555
1102 555555555555
1103 555555555454
1104 555455545412
1105 334433343132
1106 555454455455
1107 555554454443
1108 555555555555
1109 555555553433
1110 555555555555
1111 555555445555
1112 555545445455
1113 555555545554
1114 555555555555
1115 445455554443
1116 555445554433
1117 555555554445
1118 555553333144
1119 555554455143
1120 554454445444
1121 555555554533
1122 334422433422
1123 555554434444
1124 433531133222
1125 443432342224
1126 555544554433
1127 553434333333
1128 555543334443
1129 444443344323
1130 555555555555
1131 555554545344
1132 555555545554
1133 555342434333
1134 444443333233
1135 444544435444
1136 555555555555
1137 555455554354
1138 555555405054
1139 555555555555
1140 554555545545
1141 555555555544
1142 555545454344
1143 555555455555
1144 433444444343
1145 454555554444
1146 453555554544
1147 444445554444
1148 544455555455
1149 555343434343
1150 555553444454
1151 555444434443
1152 555555555444
1153 555555545443
1154 555444534455
1155 555555555555
1156 444443443434
1157 555445533543
1158 555555555444
1159 555544444354
1160 445444544243
1161 555554555455
1162 555555455444
1163 555555555544
1164 555555555454
1165 554445545454
1166 555555555543
1167 344444434443
1168 555555454453
1169 455444443433
1170 344244434433
1171 355234452132
1172 555445545455
1173 444444444444
1174 455444454433
1175 555555555555
1176 344233341155
1177 333334433233
1178 444433434333
1179 444233443334
1180 454344544444
1181 555554245253
1182 444444333344
1183 554544434333
1184 555444443343
1185 555554555445
1186 005555555544
1187 554444445244
1188 555455555555
1189 555555555444
1190 444444444433
1191 555555555444
1192 555555544454
1193 555555555544
1194 444444434444
1195 555555535553
1196 545534543334
1197 554554534533
1198 555555555554
1199 554554544544
1200 454541231221
1201 555555535544
1202 445344334432
1203 444444344333
1204 555555534444
1205 555555545555
1206 443434544232
1207 545544433343
1208 343234434333
1209 444444443233
1210 555454444455
1211 555455535455
1212 554433442243
1213 444444544454
1214 554545554544
1215 454444444444
1216 554455534455
1217 555555544355
1218 555445555555
1219 555444534444
1220 455454534444
1221 555555555544
1222 444444444455
1223 454455554344
1224 443244442233
1225 350554554434
1226 455444535343
1227 344233443433
1228 454444535545
1229 244222232232
1230 245345554344
1231 355344444443
1232 555455555444
1233 444434444233
1234 334323444322
1235 333234443233
1236 455455554454
1237 555554544434
1238 555355555444
1239 444444544443
1240 555554555544
1241 344231224131
1242 444443434433
1243 454344444431
1244 555554555553
1245 454544444443
1246 444443443532
1247 334323423222
1248 455555545554
1249 555542434443
1250 554444444443
1251 554444534344
1252 555443454555
1253 555555534554
1254 444434443343
1255 444234432233
1256 334323311333
1257 444443443233
1258 355424552242
1259 233335323322
1260 234233443333
1261 123353532334
1262 444345555244
1263 332222433422
1264 545445555443
1265 555555555555
1266 555554444443
1267 455445554455
1268 455455555455
1269 555555555555
1270 444443433445
1271 555455555544
1272 355453434232
1273 555555554344
1274 444433433433
1275 434322242112
1276 444444433433
1277 444445444544
1278 555444535444
1279 544444444443
1280 454544344334
1281 454444334333
1282 434433433332
1283 334434423423
1284 444455552233
1285 442442342233
1286 445433433343
1287 555555444355
1288 555555555555
1289 455554555545
1290 555445544444
1291 544444434443
1292 555555535333
1293 554444444344
1294 555554554445
1295 345433334121
1296 555555555554
1297 545444444233
1298 555555544455
1299 555554545555
1300 555555455555
1301 555555545555
1302 555554544455
1303 444444444333
1304 544544544445
1305 555445544544
1306 555455444455
1307 555455555454
1308 554455535444
1309 453423442244
1310 444443444444
1311 454444333333
1312 555555555542
1313 555555555543
1314 555555555544
1315 555555535534
1316 555555555444
1317 444443423333
1318 555444444444
1319 555445544453
1320 444444444443
1321 555555443444
1322 444443444333
1323 554554154344
1324 555543353333
1325 554445443333
1326 555555553455
1327 554534444243
1328 554555554545
1329 555544443443
1330 555554555555
1331 555425552422
1332 555555555555
1333 454421121321
1334 555454453433
1335 555555554443
1336 244224431223
1337 455444453444
1338 454345544455
1339 344235545044
1340 555555555544
1341 555553325554
1342 554554444244
1343 555545544544
1344 454555554545
1345 444444545444
1346 545544444455
1347 454344445443
1348 545555554453
1349 444444444443
1350 545554554453
1351 555453434444
1352 005434434454
1353 455555455544
1354 555555555554
1355 455542444433
1356 545543444555
1357 445545445444
1358 555553325454
1359 555554555554
1360 444544444443
1361 555555444454
1362 443332443222
1363 454444443444
1364 344333433332
1365 555455444455
1366 555555555445
1367 555555534454
1368 445433432343
1369 555554434444
1370 555555545444
1371 544545434455
1372 454435543444
1373 555555555555
1374 555455554555
1375 555555544554
1376 555553554455
1377 555555555555
1378 545454545444
1379 555555445555
1380 554534343444
1381 555545443343
1382 545454334444
1383 554445544544
1384 555455354344
1385 555555555355
1386 554445544354
1387 455554444444
1388 555555553543
1389 555554444444
1390 555543233444
1391 555554344433
1392 333334441223
1393 543554344434
1394 055541243244
1395 555555555544
1396 555555533444
1397 555445444544
1398 444335343433
1399 544434344333
1400 544435533333
1401 444444443333
1402 555555555554
1403 555552343233
1404 444444444433
1405 544444434444
1406 555555545555
1407 555555555554
1408 445244434444
1409 445444434444
1410 445555554521
1411 443444543343
1412 444433343434
1413 355444433442
1414 555543444455
1415 555444334544
1416 555555555555
1417 554555545555
1418 555555554555
1419 555555555555
1420 454444343445
1421 444444433444
1422 354445443444
1423 555334242132
1424 455445555543
1425 254153343433
1426 354244443333
1427 554455444344
1428 343255535444
1429 455454555553
1430 555455545555
1431 444343433343
1432 343323443323
1433 455444444424
1434 555544444455
1435 343434543444
1436 555555555544
1437 555554534243
1438 555554543344
1439 555455555544
1440 555443344343
1441 444445533133
1442 555543534555
1443 444554444444
1444 444002323320
1445 444232322222
1446 244344424441
1447 555443344334
1448 555555555555
1449 555444534443
1450 555555555555
1451 555555555550
1452 455555554555
1453 555555555555
1454
1455 end data.
1456
1457 missing values 
1458         question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24 (0).
1459
1460 factor
1461  /variables question13 question14 question15 question16 question17 question18 question19 question20 question21 question22 question23 question24
1462  /analysis all
1463  /print univariate det correlation
1464  /format blank(.30)
1465  /plot eigen
1466  /criteria factors(3)
1467  /extraction paf
1468  /method = correlation.
1469 ])
1470
1471 AT_CHECK([pspp -O format=csv factor.sps], [0],
1472   [Table: Descriptive Statistics
1473 ,Mean,Std. Deviation,Analysis N
1474 question13,4.462,.729,1365
1475 question14,4.525,.700,1365
1476 question15,4.445,.732,1365
1477 question16,4.281,.829,1365
1478 question17,4.166,.895,1365
1479 question18,3.930,1.034,1365
1480 question19,4.077,.963,1365
1481 question20,3.777,.909,1365
1482 question21,3.774,.984,1365
1483 question22,3.607,1.116,1365
1484 question23,3.813,.957,1365
1485 question24,3.666,.926,1365
1486
1487 Table: Correlation Matrix
1488 ,,question13,question14,question15,question16,question17,question18,question19,question20,question21,question22,question23,question24
1489 Correlations,question13,1.000,.661,.600,.566,.577,.409,.286,.304,.476,.333,.564,.454
1490 ,question14,.661,1.000,.635,.500,.552,.433,.320,.315,.449,.333,.565,.443
1491 ,question15,.600,.635,1.000,.505,.587,.457,.359,.356,.509,.369,.582,.435
1492 ,question16,.566,.500,.505,1.000,.586,.405,.335,.317,.452,.363,.459,.430
1493 ,question17,.577,.552,.587,.586,1.000,.555,.449,.417,.595,.450,.613,.521
1494 ,question18,.409,.433,.457,.405,.555,1.000,.627,.521,.554,.536,.569,.474
1495 ,question19,.286,.320,.359,.335,.449,.627,1.000,.446,.499,.484,.444,.374
1496 ,question20,.304,.315,.356,.317,.417,.521,.446,1.000,.425,.383,.410,.357
1497 ,question21,.476,.449,.509,.452,.595,.554,.499,.425,1.000,.507,.598,.500
1498 ,question22,.333,.333,.369,.363,.450,.536,.484,.383,.507,1.000,.493,.444
1499 ,question23,.564,.565,.582,.459,.613,.569,.444,.410,.598,.493,1.000,.705
1500 ,question24,.454,.443,.435,.430,.521,.474,.374,.357,.500,.444,.705,1.000
1501 Determinant,.002,,,,,,,,,,,,
1502
1503 Table: Factor Matrix
1504 ,Factor,,
1505 ,1,2,3
1506 question13,.713,.398,
1507 question14,.703,.339,
1508 question15,.721,,
1509 question16,.648,,
1510 question17,.783,,
1511 question18,.740,-.345,
1512 question19,.616,-.415,
1513 question20,.550,,
1514 question21,.732,,
1515 question22,.613,,
1516 question23,.819,,.345
1517 question24,.695,,.386
1518  
1519 Table: Rotated Factor Matrix
1520 ,Factor,,
1521 ,1,2,3
1522 question13,.771,,
1523 question14,.726,,
1524 question15,.676,,
1525 question16,.591,,
1526 question17,.587,.446,
1527 question18,,.739,
1528 question19,,.727,
1529 question20,,.540,
1530 question21,.402,.533,.321
1531 question22,,.559,
1532 question23,.449,.377,.668
1533 question24,.324,.321,.652
1534 ])
1535
1536 AT_CLEANUP
1537
1538 AT_SETUP([FACTOR extraction=pc method=correlation])
1539 dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm        
1540
1541 AT_DATA([factor2.sps],
1542   [set format = F11.3.
1543
1544
1545 data list notable list /id female race ses schtyp prog read write math science socst.
1546 begin data.
1547  70.00      .00  4.00     1.00     1.00     1.00    57.00    52.00    41.00    47.00    57.00
1548 121.00     1.00  4.00     2.00     1.00     3.00    68.00    59.00    53.00    63.00    61.00
1549  86.00      .00  4.00     3.00     1.00     1.00    44.00    33.00    54.00    58.00    31.00
1550 141.00      .00  4.00     3.00     1.00     3.00    63.00    44.00    47.00    53.00    56.00
1551 172.00      .00  4.00     2.00     1.00     2.00    47.00    52.00    57.00    53.00    61.00
1552 113.00      .00  4.00     2.00     1.00     2.00    44.00    52.00    51.00    63.00    61.00
1553  50.00      .00  3.00     2.00     1.00     1.00    50.00    59.00    42.00    53.00    61.00
1554  11.00      .00  1.00     2.00     1.00     2.00    34.00    46.00    45.00    39.00    36.00
1555  84.00      .00  4.00     2.00     1.00     1.00    63.00    57.00    54.00    58.00    51.00
1556  48.00      .00  3.00     2.00     1.00     2.00    57.00    55.00    52.00    50.00    51.00
1557  75.00      .00  4.00     2.00     1.00     3.00    60.00    46.00    51.00    53.00    61.00
1558  60.00      .00  4.00     2.00     1.00     2.00    57.00    65.00    51.00    63.00    61.00
1559  95.00      .00  4.00     3.00     1.00     2.00    73.00    60.00    71.00    61.00    71.00
1560 104.00      .00  4.00     3.00     1.00     2.00    54.00    63.00    57.00    55.00    46.00
1561  38.00      .00  3.00     1.00     1.00     2.00    45.00    57.00    50.00    31.00    56.00
1562 115.00      .00  4.00     1.00     1.00     1.00    42.00    49.00    43.00    50.00    56.00
1563  76.00      .00  4.00     3.00     1.00     2.00    47.00    52.00    51.00    50.00    56.00
1564 195.00      .00  4.00     2.00     2.00     1.00    57.00    57.00    60.00    58.00    56.00
1565 114.00      .00  4.00     3.00     1.00     2.00    68.00    65.00    62.00    55.00    61.00
1566  85.00      .00  4.00     2.00     1.00     1.00    55.00    39.00    57.00    53.00    46.00
1567 167.00      .00  4.00     2.00     1.00     1.00    63.00    49.00    35.00    66.00    41.00
1568 143.00      .00  4.00     2.00     1.00     3.00    63.00    63.00    75.00    72.00    66.00
1569  41.00      .00  3.00     2.00     1.00     2.00    50.00    40.00    45.00    55.00    56.00
1570  20.00      .00  1.00     3.00     1.00     2.00    60.00    52.00    57.00    61.00    61.00
1571  12.00      .00  1.00     2.00     1.00     3.00    37.00    44.00    45.00    39.00    46.00
1572  53.00      .00  3.00     2.00     1.00     3.00    34.00    37.00    46.00    39.00    31.00
1573 154.00      .00  4.00     3.00     1.00     2.00    65.00    65.00    66.00    61.00    66.00
1574 178.00      .00  4.00     2.00     2.00     3.00    47.00    57.00    57.00    58.00    46.00
1575 196.00      .00  4.00     3.00     2.00     2.00    44.00    38.00    49.00    39.00    46.00
1576  29.00      .00  2.00     1.00     1.00     1.00    52.00    44.00    49.00    55.00    41.00
1577 126.00      .00  4.00     2.00     1.00     1.00    42.00    31.00    57.00    47.00    51.00
1578 103.00      .00  4.00     3.00     1.00     2.00    76.00    52.00    64.00    64.00    61.00
1579 192.00      .00  4.00     3.00     2.00     2.00    65.00    67.00    63.00    66.00    71.00
1580 150.00      .00  4.00     2.00     1.00     3.00    42.00    41.00    57.00    72.00    31.00
1581 199.00      .00  4.00     3.00     2.00     2.00    52.00    59.00    50.00    61.00    61.00
1582 144.00      .00  4.00     3.00     1.00     1.00    60.00    65.00    58.00    61.00    66.00
1583 200.00      .00  4.00     2.00     2.00     2.00    68.00    54.00    75.00    66.00    66.00
1584  80.00      .00  4.00     3.00     1.00     2.00    65.00    62.00    68.00    66.00    66.00
1585  16.00      .00  1.00     1.00     1.00     3.00    47.00    31.00    44.00    36.00    36.00
1586 153.00      .00  4.00     2.00     1.00     3.00    39.00    31.00    40.00    39.00    51.00
1587 176.00      .00  4.00     2.00     2.00     2.00    47.00    47.00    41.00    42.00    51.00
1588 177.00      .00  4.00     2.00     2.00     2.00    55.00    59.00    62.00    58.00    51.00
1589 168.00      .00  4.00     2.00     1.00     2.00    52.00    54.00    57.00    55.00    51.00
1590  40.00      .00  3.00     1.00     1.00     1.00    42.00    41.00    43.00    50.00    41.00
1591  62.00      .00  4.00     3.00     1.00     1.00    65.00    65.00    48.00    63.00    66.00
1592 169.00      .00  4.00     1.00     1.00     1.00    55.00    59.00    63.00    69.00    46.00
1593  49.00      .00  3.00     3.00     1.00     3.00    50.00    40.00    39.00    49.00    47.00
1594 136.00      .00  4.00     2.00     1.00     2.00    65.00    59.00    70.00    63.00    51.00
1595 189.00      .00  4.00     2.00     2.00     2.00    47.00    59.00    63.00    53.00    46.00
1596   7.00      .00  1.00     2.00     1.00     2.00    57.00    54.00    59.00    47.00    51.00
1597  27.00      .00  2.00     2.00     1.00     2.00    53.00    61.00    61.00    57.00    56.00
1598 128.00      .00  4.00     3.00     1.00     2.00    39.00    33.00    38.00    47.00    41.00
1599  21.00      .00  1.00     2.00     1.00     1.00    44.00    44.00    61.00    50.00    46.00
1600 183.00      .00  4.00     2.00     2.00     2.00    63.00    59.00    49.00    55.00    71.00
1601 132.00      .00  4.00     2.00     1.00     2.00    73.00    62.00    73.00    69.00    66.00
1602  15.00      .00  1.00     3.00     1.00     3.00    39.00    39.00    44.00    26.00    42.00
1603  67.00      .00  4.00     1.00     1.00     3.00    37.00    37.00    42.00    33.00    32.00
1604  22.00      .00  1.00     2.00     1.00     3.00    42.00    39.00    39.00    56.00    46.00
1605 185.00      .00  4.00     2.00     2.00     2.00    63.00    57.00    55.00    58.00    41.00
1606   9.00      .00  1.00     2.00     1.00     3.00    48.00    49.00    52.00    44.00    51.00
1607 181.00      .00  4.00     2.00     2.00     2.00    50.00    46.00    45.00    58.00    61.00
1608 170.00      .00  4.00     3.00     1.00     2.00    47.00    62.00    61.00    69.00    66.00
1609 134.00      .00  4.00     1.00     1.00     1.00    44.00    44.00    39.00    34.00    46.00
1610 108.00      .00  4.00     2.00     1.00     1.00    34.00    33.00    41.00    36.00    36.00
1611 197.00      .00  4.00     3.00     2.00     2.00    50.00    42.00    50.00    36.00    61.00
1612 140.00      .00  4.00     2.00     1.00     3.00    44.00    41.00    40.00    50.00    26.00
1613 171.00      .00  4.00     2.00     1.00     2.00    60.00    54.00    60.00    55.00    66.00
1614 107.00      .00  4.00     1.00     1.00     3.00    47.00    39.00    47.00    42.00    26.00
1615  81.00      .00  4.00     1.00     1.00     2.00    63.00    43.00    59.00    65.00    44.00
1616  18.00      .00  1.00     2.00     1.00     3.00    50.00    33.00    49.00    44.00    36.00
1617 155.00      .00  4.00     2.00     1.00     1.00    44.00    44.00    46.00    39.00    51.00
1618  97.00      .00  4.00     3.00     1.00     2.00    60.00    54.00    58.00    58.00    61.00
1619  68.00      .00  4.00     2.00     1.00     2.00    73.00    67.00    71.00    63.00    66.00
1620 157.00      .00  4.00     2.00     1.00     1.00    68.00    59.00    58.00    74.00    66.00
1621  56.00      .00  4.00     2.00     1.00     3.00    55.00    45.00    46.00    58.00    51.00
1622   5.00      .00  1.00     1.00     1.00     2.00    47.00    40.00    43.00    45.00    31.00
1623 159.00      .00  4.00     3.00     1.00     2.00    55.00    61.00    54.00    49.00    61.00
1624 123.00      .00  4.00     3.00     1.00     1.00    68.00    59.00    56.00    63.00    66.00
1625 164.00      .00  4.00     2.00     1.00     3.00    31.00    36.00    46.00    39.00    46.00
1626  14.00      .00  1.00     3.00     1.00     2.00    47.00    41.00    54.00    42.00    56.00
1627 127.00      .00  4.00     3.00     1.00     2.00    63.00    59.00    57.00    55.00    56.00
1628 165.00      .00  4.00     1.00     1.00     3.00    36.00    49.00    54.00    61.00    36.00
1629 174.00      .00  4.00     2.00     2.00     2.00    68.00    59.00    71.00    66.00    56.00
1630   3.00      .00  1.00     1.00     1.00     2.00    63.00    65.00    48.00    63.00    56.00
1631  58.00      .00  4.00     2.00     1.00     3.00    55.00    41.00    40.00    44.00    41.00
1632 146.00      .00  4.00     3.00     1.00     2.00    55.00    62.00    64.00    63.00    66.00
1633 102.00      .00  4.00     3.00     1.00     2.00    52.00    41.00    51.00    53.00    56.00
1634 117.00      .00  4.00     3.00     1.00     3.00    34.00    49.00    39.00    42.00    56.00
1635 133.00      .00  4.00     2.00     1.00     3.00    50.00    31.00    40.00    34.00    31.00
1636  94.00      .00  4.00     3.00     1.00     2.00    55.00    49.00    61.00    61.00    56.00
1637  24.00      .00  2.00     2.00     1.00     2.00    52.00    62.00    66.00    47.00    46.00
1638 149.00      .00  4.00     1.00     1.00     1.00    63.00    49.00    49.00    66.00    46.00
1639  82.00     1.00  4.00     3.00     1.00     2.00    68.00    62.00    65.00    69.00    61.00
1640   8.00     1.00  1.00     1.00     1.00     2.00    39.00    44.00    52.00    44.00    48.00
1641 129.00     1.00  4.00     1.00     1.00     1.00    44.00    44.00    46.00    47.00    51.00
1642 173.00     1.00  4.00     1.00     1.00     1.00    50.00    62.00    61.00    63.00    51.00
1643  57.00     1.00  4.00     2.00     1.00     2.00    71.00    65.00    72.00    66.00    56.00
1644 100.00     1.00  4.00     3.00     1.00     2.00    63.00    65.00    71.00    69.00    71.00
1645   1.00     1.00  1.00     1.00     1.00     3.00    34.00    44.00    40.00    39.00    41.00
1646 194.00     1.00  4.00     3.00     2.00     2.00    63.00    63.00    69.00    61.00    61.00
1647  88.00     1.00  4.00     3.00     1.00     2.00    68.00    60.00    64.00    69.00    66.00
1648  99.00     1.00  4.00     3.00     1.00     1.00    47.00    59.00    56.00    66.00    61.00
1649  47.00     1.00  3.00     1.00     1.00     2.00    47.00    46.00    49.00    33.00    41.00
1650 120.00     1.00  4.00     3.00     1.00     2.00    63.00    52.00    54.00    50.00    51.00
1651 166.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    53.00    61.00    51.00
1652  65.00     1.00  4.00     2.00     1.00     2.00    55.00    54.00    66.00    42.00    56.00
1653 101.00     1.00  4.00     3.00     1.00     2.00    60.00    62.00    67.00    50.00    56.00
1654  89.00     1.00  4.00     1.00     1.00     3.00    35.00    35.00    40.00    51.00    33.00
1655  54.00     1.00  3.00     1.00     2.00     1.00    47.00    54.00    46.00    50.00    56.00
1656 180.00     1.00  4.00     3.00     2.00     2.00    71.00    65.00    69.00    58.00    71.00
1657 162.00     1.00  4.00     2.00     1.00     3.00    57.00    52.00    40.00    61.00    56.00
1658   4.00     1.00  1.00     1.00     1.00     2.00    44.00    50.00    41.00    39.00    51.00
1659 131.00     1.00  4.00     3.00     1.00     2.00    65.00    59.00    57.00    46.00    66.00
1660 125.00     1.00  4.00     1.00     1.00     2.00    68.00    65.00    58.00    59.00    56.00
1661  34.00     1.00  1.00     3.00     2.00     2.00    73.00    61.00    57.00    55.00    66.00
1662 106.00     1.00  4.00     2.00     1.00     3.00    36.00    44.00    37.00    42.00    41.00
1663 130.00     1.00  4.00     3.00     1.00     1.00    43.00    54.00    55.00    55.00    46.00
1664  93.00     1.00  4.00     3.00     1.00     2.00    73.00    67.00    62.00    58.00    66.00
1665 163.00     1.00  4.00     1.00     1.00     2.00    52.00    57.00    64.00    58.00    56.00
1666  37.00     1.00  3.00     1.00     1.00     3.00    41.00    47.00    40.00    39.00    51.00
1667  35.00     1.00  1.00     1.00     2.00     1.00    60.00    54.00    50.00    50.00    51.00
1668  87.00     1.00  4.00     2.00     1.00     1.00    50.00    52.00    46.00    50.00    56.00
1669  73.00     1.00  4.00     2.00     1.00     2.00    50.00    52.00    53.00    39.00    56.00
1670 151.00     1.00  4.00     2.00     1.00     3.00    47.00    46.00    52.00    48.00    46.00
1671  44.00     1.00  3.00     1.00     1.00     3.00    47.00    62.00    45.00    34.00    46.00
1672 152.00     1.00  4.00     3.00     1.00     2.00    55.00    57.00    56.00    58.00    61.00
1673 105.00     1.00  4.00     2.00     1.00     2.00    50.00    41.00    45.00    44.00    56.00
1674  28.00     1.00  2.00     2.00     1.00     1.00    39.00    53.00    54.00    50.00    41.00
1675  91.00     1.00  4.00     3.00     1.00     3.00    50.00    49.00    56.00    47.00    46.00
1676  45.00     1.00  3.00     1.00     1.00     3.00    34.00    35.00    41.00    29.00    26.00
1677 116.00     1.00  4.00     2.00     1.00     2.00    57.00    59.00    54.00    50.00    56.00
1678  33.00     1.00  2.00     1.00     1.00     2.00    57.00    65.00    72.00    54.00    56.00
1679  66.00     1.00  4.00     2.00     1.00     3.00    68.00    62.00    56.00    50.00    51.00
1680  72.00     1.00  4.00     2.00     1.00     3.00    42.00    54.00    47.00    47.00    46.00
1681  77.00     1.00  4.00     1.00     1.00     2.00    61.00    59.00    49.00    44.00    66.00
1682  61.00     1.00  4.00     3.00     1.00     2.00    76.00    63.00    60.00    67.00    66.00
1683 190.00     1.00  4.00     2.00     2.00     2.00    47.00    59.00    54.00    58.00    46.00
1684  42.00     1.00  3.00     2.00     1.00     3.00    46.00    52.00    55.00    44.00    56.00
1685   2.00     1.00  1.00     2.00     1.00     3.00    39.00    41.00    33.00    42.00    41.00
1686  55.00     1.00  3.00     2.00     2.00     2.00    52.00    49.00    49.00    44.00    61.00
1687  19.00     1.00  1.00     1.00     1.00     1.00    28.00    46.00    43.00    44.00    51.00
1688  90.00     1.00  4.00     3.00     1.00     2.00    42.00    54.00    50.00    50.00    52.00
1689 142.00     1.00  4.00     2.00     1.00     3.00    47.00    42.00    52.00    39.00    51.00
1690  17.00     1.00  1.00     2.00     1.00     2.00    47.00    57.00    48.00    44.00    41.00
1691 122.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    58.00    53.00    66.00
1692 191.00     1.00  4.00     3.00     2.00     2.00    47.00    52.00    43.00    48.00    61.00
1693  83.00     1.00  4.00     2.00     1.00     3.00    50.00    62.00    41.00    55.00    31.00
1694 182.00     1.00  4.00     2.00     2.00     2.00    44.00    52.00    43.00    44.00    51.00
1695   6.00     1.00  1.00     1.00     1.00     2.00    47.00    41.00    46.00    40.00    41.00
1696  46.00     1.00  3.00     1.00     1.00     2.00    45.00    55.00    44.00    34.00    41.00
1697  43.00     1.00  3.00     1.00     1.00     2.00    47.00    37.00    43.00    42.00    46.00
1698  96.00     1.00  4.00     3.00     1.00     2.00    65.00    54.00    61.00    58.00    56.00
1699 138.00     1.00  4.00     2.00     1.00     3.00    43.00    57.00    40.00    50.00    51.00
1700  10.00     1.00  1.00     2.00     1.00     1.00    47.00    54.00    49.00    53.00    61.00
1701  71.00     1.00  4.00     2.00     1.00     1.00    57.00    62.00    56.00    58.00    66.00
1702 139.00     1.00  4.00     2.00     1.00     2.00    68.00    59.00    61.00    55.00    71.00
1703 110.00     1.00  4.00     2.00     1.00     3.00    52.00    55.00    50.00    54.00    61.00
1704 148.00     1.00  4.00     2.00     1.00     3.00    42.00    57.00    51.00    47.00    61.00
1705 109.00     1.00  4.00     2.00     1.00     1.00    42.00    39.00    42.00    42.00    41.00
1706  39.00     1.00  3.00     3.00     1.00     2.00    66.00    67.00    67.00    61.00    66.00
1707 147.00     1.00  4.00     1.00     1.00     2.00    47.00    62.00    53.00    53.00    61.00
1708  74.00     1.00  4.00     2.00     1.00     2.00    57.00    50.00    50.00    51.00    58.00
1709 198.00     1.00  4.00     3.00     2.00     2.00    47.00    61.00    51.00    63.00    31.00
1710 161.00     1.00  4.00     1.00     1.00     2.00    57.00    62.00    72.00    61.00    61.00
1711 112.00     1.00  4.00     2.00     1.00     2.00    52.00    59.00    48.00    55.00    61.00
1712  69.00     1.00  4.00     1.00     1.00     3.00    44.00    44.00    40.00    40.00    31.00
1713 156.00     1.00  4.00     2.00     1.00     2.00    50.00    59.00    53.00    61.00    61.00
1714 111.00     1.00  4.00     1.00     1.00     1.00    39.00    54.00    39.00    47.00    36.00
1715 186.00     1.00  4.00     2.00     2.00     2.00    57.00    62.00    63.00    55.00    41.00
1716  98.00     1.00  4.00     1.00     1.00     3.00    57.00    60.00    51.00    53.00    37.00
1717 119.00     1.00  4.00     1.00     1.00     1.00    42.00    57.00    45.00    50.00    43.00
1718  13.00     1.00  1.00     2.00     1.00     3.00    47.00    46.00    39.00    47.00    61.00
1719  51.00     1.00  3.00     3.00     1.00     1.00    42.00    36.00    42.00    31.00    39.00
1720  26.00     1.00  2.00     3.00     1.00     2.00    60.00    59.00    62.00    61.00    51.00
1721  36.00     1.00  3.00     1.00     1.00     1.00    44.00    49.00    44.00    35.00    51.00
1722 135.00     1.00  4.00     1.00     1.00     2.00    63.00    60.00    65.00    54.00    66.00
1723  59.00     1.00  4.00     2.00     1.00     2.00    65.00    67.00    63.00    55.00    71.00
1724  78.00     1.00  4.00     2.00     1.00     2.00    39.00    54.00    54.00    53.00    41.00
1725  64.00     1.00  4.00     3.00     1.00     3.00    50.00    52.00    45.00    58.00    36.00
1726  63.00     1.00  4.00     1.00     1.00     1.00    52.00    65.00    60.00    56.00    51.00
1727  79.00     1.00  4.00     2.00     1.00     2.00    60.00    62.00    49.00    50.00    51.00
1728 193.00     1.00  4.00     2.00     2.00     2.00    44.00    49.00    48.00    39.00    51.00
1729  92.00     1.00  4.00     3.00     1.00     1.00    52.00    67.00    57.00    63.00    61.00
1730 160.00     1.00  4.00     2.00     1.00     2.00    55.00    65.00    55.00    50.00    61.00
1731  32.00     1.00  2.00     3.00     1.00     3.00    50.00    67.00    66.00    66.00    56.00
1732  23.00     1.00  2.00     1.00     1.00     2.00    65.00    65.00    64.00    58.00    71.00
1733 158.00     1.00  4.00     2.00     1.00     1.00    52.00    54.00    55.00    53.00    51.00
1734  25.00     1.00  2.00     2.00     1.00     1.00    47.00    44.00    42.00    42.00    36.00
1735 188.00     1.00  4.00     3.00     2.00     2.00    63.00    62.00    56.00    55.00    61.00
1736  52.00     1.00  3.00     1.00     1.00     2.00    50.00    46.00    53.00    53.00    66.00
1737 124.00     1.00  4.00     1.00     1.00     3.00    42.00    54.00    41.00    42.00    41.00
1738 175.00     1.00  4.00     3.00     2.00     1.00    36.00    57.00    42.00    50.00    41.00
1739 184.00     1.00  4.00     2.00     2.00     3.00    50.00    52.00    53.00    55.00    56.00
1740  30.00     1.00  2.00     3.00     1.00     2.00    41.00    59.00    42.00    34.00    51.00
1741 179.00     1.00  4.00     2.00     2.00     2.00    47.00    65.00    60.00    50.00    56.00
1742  31.00     1.00  2.00     2.00     2.00     1.00    55.00    59.00    52.00    42.00    56.00
1743 145.00     1.00  4.00     2.00     1.00     3.00    42.00    46.00    38.00    36.00    46.00
1744 187.00     1.00  4.00     2.00     2.00     1.00    57.00    41.00    57.00    55.00    52.00
1745 118.00     1.00  4.00     2.00     1.00     1.00    55.00    62.00    58.00    58.00    61.00
1746 137.00     1.00  4.00     3.00     1.00     2.00    63.00    65.00    65.00    53.00    61.00
1747 end data.
1748
1749 factor
1750   /variables read write math science socst
1751   /analysis read write math science socst
1752   /extraction pc
1753   /plot eigen
1754   /criteria mineigen (.557)
1755   .
1756 ])
1757
1758 AT_CHECK([pspp -O format=csv factor2.sps], [0],
1759   [Table: Communalities
1760 ,Initial,Extraction
1761 read,1.000,.736
1762 write,1.000,.704
1763 math,1.000,.750
1764 science,1.000,.849
1765 socst,1.000,.900
1766
1767 Table: Total Variance Explained
1768 ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings,,
1769 Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
1770 1,3.381,67.616,67.616,3.381,67.616,67.616,2.113,42.267,42.267
1771 2,.557,11.148,78.764,.557,11.148,78.764,1.825,36.497,78.764
1772 3,.407,8.136,86.900,,,,,,
1773 4,.356,7.123,94.023,,,,,,
1774 5,.299,5.977,100.000,,,,,,
1775
1776 Table: Component Matrix
1777 ,Component,
1778 ,1,2
1779 read,.858,.020
1780 write,.824,-.155
1781 math,.844,.195
1782 science,.801,.456
1783 socst,.783,-.536
1784
1785 Table: Rotated Component Matrix
1786 ,Component,
1787 ,1,2
1788 read,.650,.559
1789 write,.508,.667
1790 math,.757,.421
1791 science,.900,.198
1792 socst,.222,.922
1793 ])
1794
1795 AT_CLEANUP
1796
1797
1798
1799 AT_SETUP([FACTOR empty dataset])
1800 dnl Test that something sane happens when the dataset contains no complete observations
1801
1802 AT_DATA([factor-empty.sps],
1803   [data list notable list /x * y * z *.
1804 begin data.
1805 3.4        .     92.9
1806 .        32.09   34.2
1807 1.00     19.80     .
1808 2.00       .      3.6
1809 end data.
1810
1811 factor /variables = ALL.
1812 ])
1813
1814 AT_CHECK([pspp -O format=csv factor-empty.sps], [0], [ignore])
1815 AT_CLEANUP
1816
1817
1818 dnl Fixes a crash reported at
1819 dnl http://lists.gnu.org/archive/html/bug-gnu-pspp/2012-04/msg00001.html
1820 AT_SETUP([FACTOR /ROTATION=NOROTATE])
1821 AT_DATA([factor-norotate.sps], [dnl
1822 DATA LIST FREE / TRAIT1 TO TRAIT5 (F8.2).
1823 BEGIN DATA
1824 1 5 5 1 1
1825 8 9 7 9 8
1826 9 8 9 9 8
1827 9 9 9 9 9
1828 1 9 1 1 9
1829 9 7 7 9 9
1830 9 7 9 9 7
1831 END DATA
1832
1833 FACTOR /VARIABLES=TRAIT1 TO TRAIT5
1834     /ROTATION=NOROTATE /* NOROTATE may have caused the problem. */
1835     /EXTRACTION=PC
1836     /PRINT=DEFAULT DET UNIVARIATE ROTATION SIG CORRELATION.
1837 ])
1838
1839 AT_CHECK([pspp -O format=csv factor-norotate.sps], [0], [dnl
1840 Table: Descriptive Statistics
1841 ,Mean,Std. Deviation,Analysis N
1842 TRAIT1,6.57,3.54,7
1843 TRAIT2,7.71,1.39,7
1844 TRAIT3,6.71,2.71,7
1845 TRAIT4,6.71,3.61,7
1846 TRAIT5,7.29,2.66,7
1847
1848 Table: Correlation Matrix
1849 ,,TRAIT1,TRAIT2,TRAIT3,TRAIT4,TRAIT5
1850 Correlations,TRAIT1,1.00,.30,.88,1.00,.54
1851 ,TRAIT2,.30,1.00,-.02,.33,.84
1852 ,TRAIT3,.88,-.02,1.00,.87,.13
1853 ,TRAIT4,1.00,.33,.87,1.00,.54
1854 ,TRAIT5,.54,.84,.13,.54,1.00
1855 Sig. (1-tailed),TRAIT1,,.260,.004,.000,.103
1856 ,TRAIT2,.260,,.482,.238,.009
1857 ,TRAIT3,.004,.482,,.006,.390
1858 ,TRAIT4,.000,.238,.006,,.103
1859 ,TRAIT5,.103,.009,.390,.103,
1860 Determinant,.00,,,,,
1861
1862 Table: Communalities
1863 ,Initial,Extraction
1864 TRAIT1,1.00,1.00
1865 TRAIT2,1.00,1.00
1866 TRAIT3,1.00,.99
1867 TRAIT4,1.00,.99
1868 TRAIT5,1.00,.99
1869
1870 Table: Total Variance Explained
1871 ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
1872 Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
1873 1,3.26,65.26,65.26,3.26,65.26,65.26
1874 2,1.54,30.77,96.03,1.54,30.77,96.03
1875 3,.17,3.36,99.39,.17,3.36,99.39
1876 4,.03,.61,100.00,.03,.61,100.00
1877 5,.00,.00,100.00,,,
1878
1879 Table: Component Matrix
1880 ,Component,,,
1881 ,1,2,3,4
1882 TRAIT1,.97,.23,-.08,.00
1883 TRAIT2,.52,-.81,.28,.00
1884 TRAIT3,.78,.59,.17,.00
1885 TRAIT4,.97,.21,-.04,.00
1886 TRAIT5,.70,-.67,-.23,.00
1887 ])
1888 AT_CLEANUP
1889
1890
1891
1892 dnl Fixes a bug in the way that the /CRITERIA = ITERATE option was interpreted.
1893 dnl http://lists.gnu.org/archive/html/bug-gnu-pspp/2013-09/msg00036.html
1894 AT_SETUP([FACTOR /CRITERIA=ITERATE])
1895 AT_DATA([factor-iterate.sps], [dnl
1896 set format = F20.3.
1897 data list notable list /x y z *.
1898 begin data.
1899 1.00    5.00    3.00
1900 2.00    2.00    2.00
1901 3.00    1.00    1.00
1902 4.00    4.00    5.00
1903 5.00    3.00    9.00
1904 6.00    6.00    4.00
1905 7.00    7.00    6.00
1906 8.00    8.00    8.00
1907 9.00    9.00    7.00
1908 end data.
1909
1910 FACTOR
1911  /VARIABLES= x y z
1912  /CRITERIA = MINEIGEN (1) ITERATE (25)
1913  /EXTRACTION =PAF
1914  /METHOD = CORRELATION
1915  /PRINT = INITIAL EXTRACTION
1916  /CRITERIA = ITERATE (0)
1917  /ROTATION = NOROTATE.
1918 ])
1919
1920 AT_CHECK([pspp -O format=csv factor-iterate.sps], [0], [dnl
1921 Table: Communalities
1922 ,Initial,Extraction
1923 x,.735,.979
1924 y,.640,.653
1925 z,.514,.523
1926
1927 Table: Total Variance Explained
1928 ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
1929 Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
1930 1,2.404,80.124,80.124,2.155,71.847,71.847
1931 2,.425,14.166,94.290,,,
1932 3,.171,5.710,100.000,,,
1933
1934 Table: Factor Matrix
1935 ,Factor
1936 ,1
1937 x,.990
1938 y,.808
1939 z,.723
1940 ])
1941 AT_CLEANUP
1942
1943
1944 AT_SETUP([FACTOR promax])
1945 AT_DATA([factor-promax.sps], [dnl
1946 set decimal=dot.
1947 set format=F22.3.
1948
1949 get file='llz.zsav'.
1950
1951 factor 
1952         /variables pz pn ps nz nn ns tz tn ts oz on os sz sn ss zz zn zs 
1953         /missing listwise 
1954         /print initial extraction rotation 
1955         /criteria mineigen(1) iterate(25) 
1956         /extraction paf 
1957         /method correlation
1958         /rotation promax (5).
1959 ])
1960
1961 AT_CHECK([ln -s $top_srcdir/tests/language/stats/llz.zsav .], [0], [ignore])
1962
1963 AT_CHECK([pspp -O format=csv factor-promax.sps], [0], [dnl
1964 Table: Communalities
1965 ,Initial,Extraction
1966 PZ,.191,.375
1967 PN,.042,.102
1968 PS,.458,.623
1969 NZ,.100,.163
1970 NN,.065,.079
1971 NS,.129,.148
1972 TZ,.181,.344
1973 TN,.102,.142
1974 TS,.310,.372
1975 OZ,.097,.158
1976 ON,.323,.410
1977 OS,.469,.617
1978 SZ,.104,.170
1979 SN,.154,.267
1980 SS,.081,.180
1981 ZZ,.123,.192
1982 ZN,.208,.412
1983 ZS,.130,.158
1984
1985 Table: Total Variance Explained
1986 ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,,Rotation Sums of Squared Loadings
1987 Factor,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %,Total
1988 1,2.968,16.491,16.491,2.411,13.393,13.393,2.355
1989 2,2.026,11.253,27.744,1.271,7.059,20.452,1.209
1990 3,1.622,9.011,36.756,.948,5.264,25.716,1.231
1991 4,1.086,6.032,42.788,.283,1.574,27.290,.770
1992 5,.996,5.533,48.321,,,,
1993 6,.923,5.130,53.451,,,,
1994 7,.873,4.852,58.303,,,,
1995 8,.856,4.756,63.060,,,,
1996 9,.836,4.644,67.703,,,,
1997 10,.816,4.534,72.237,,,,
1998 11,.785,4.359,76.596,,,,
1999 12,.740,4.110,80.706,,,,
2000 13,.713,3.964,84.670,,,,
2001 14,.653,3.626,88.296,,,,
2002 15,.633,3.519,91.815,,,,
2003 16,.604,3.356,95.171,,,,
2004 17,.484,2.687,97.858,,,,
2005 18,.386,2.142,100.000,,,,
2006
2007 Table: Factor Matrix
2008 ,Factor,,,
2009 ,1,2,3,4
2010 PZ,-.276,.154,.510,.124
2011 PN,.096,.129,-.091,.261
2012 PS,.746,-.085,.234,.063
2013 NZ,-.111,.323,.206,-.058
2014 NN,.007,.260,-.083,-.069
2015 NS,.366,.096,.046,.051
2016 TZ,-.228,.172,.509,.059
2017 TN,.131,.345,-.074,.029
2018 TS,.601,-.005,.098,.030
2019 OZ,-.145,.166,.322,-.081
2020 ON,.607,.082,.073,-.173
2021 OS,.757,-.059,.171,-.104
2022 SZ,-.142,.307,.226,-.066
2023 SN,.175,.436,-.183,.115
2024 SS,.199,.206,-.083,.302
2025 ZZ,-.074,.411,-.080,-.104
2026 ZN,.015,.580,-.252,-.114
2027 ZS,.365,.156,-.004,.015
2028
2029 Table: Pattern Matrix
2030 ,Factor,,,
2031 ,1,2,3,4
2032 PZ,-.063,-.126,.599,.085
2033 PN,-.035,.000,-.033,.325
2034 PS,.762,-.175,.058,.081
2035 NZ,.027,.230,.327,-.044
2036 NN,.008,.289,.008,-.026
2037 NS,.344,.044,.015,.091
2038 TZ,.004,-.074,.589,.020
2039 TN,.097,.307,.033,.103
2040 TS,.585,-.043,-.017,.062
2041 OZ,.046,.067,.382,-.109
2042 ON,.654,.151,-.029,-.145
2043 OS,.803,-.037,-.009,-.092
2044 SZ,.009,.213,.345,-.060
2045 SN,.065,.376,-.036,.227
2046 SS,.054,.042,-.013,.388
2047 ZZ,-.044,.434,.078,-.046
2048 ZN,-.025,.646,-.041,-.006
2049 ZS,.337,.133,-.013,.067
2050
2051 Table: Structure Matrix
2052 ,Factor,,,
2053 ,1,2,3,4
2054 PZ,-.177,-.058,.598,-.022
2055 PN,.068,.110,-.049,.317
2056 PS,.771,-.138,-.136,.240
2057 NZ,-.060,.236,.339,.019
2058 NN,.000,.281,.027,.076
2059 NS,.368,.080,-.068,.207
2060 TZ,-.127,-.028,.582,-.049
2061 TN,.122,.345,.023,.235
2062 TS,.607,-.018,-.160,.221
2063 OZ,-.074,.055,.384,-.101
2064 ON,.619,.104,-.160,.102
2065 OS,.778,-.064,-.190,.132
2066 SZ,-.086,.215,.361,-.009
2067 SN,.143,.453,-.044,.380
2068 SS,.171,.176,-.052,.420
2069 ZZ,-.073,.422,.120,.085
2070 ZN,-.013,.641,.008,.214
2071 ZS,.361,.158,-.088,.213
2072
2073 Table: Factor Correlation Matrix
2074 Factor,1,2,3,4
2075 1,1.000,.008,-.232,.294
2076 2,.008,1.000,.065,.347
2077 3,-.232,.065,1.000,-.076
2078 4,.294,.347,-.076,1.000
2079 ])
2080
2081
2082 AT_CLEANUP
2083
2084
2085
2086
2087
2088
2089 AT_SETUP([FACTOR covariance matrix])
2090
2091 AT_DATA([covariance-matrix.sps], [dnl
2092 set format = F10.3.
2093 matrix data
2094     variables = rowtype_  var01 var02 var03 var04 var05 var06 var07 var08
2095     / format = lower diagonal .
2096 begin data
2097 mean     24.3  5.4  69.7  20.1  13.4  2.7  27.9  3.7  
2098 sd        5.7  1.5  23.5  5.8    2.8  4.5   5.4  1.5  
2099 n        92   92    92   92     92   92    92   92   
2100 cov   32.490000 
2101 cov   1.539000 2.250000 
2102 cov   -29.469000 -5.992500 552.250000 
2103 cov   11.901600 2.697000 -19.082000 33.640000 
2104 cov   4.309200 0.672000 -7.896000 3.572800 7.840000 
2105 cov   8.464500 1.012500 -17.977500 6.264000 2.646000 20.250000 
2106 cov   15.390000 2.349000 -25.380000 10.022400 1.814400 9.234000 29.160000 
2107 cov   1.453500 0.652500 -1.762500 1.740000 1.134000 1.350000 0.324000 2.250000 
2108 end data.
2109
2110 factor matrix in (cov = *)
2111     / method = covariance
2112     / print = initial covariance
2113     / extraction = pc
2114     / rotation = norotate.
2115 ])
2116
2117 AT_CHECK([pspp -O format=csv covariance-matrix.sps], [0], [dnl
2118 Table: Covariance Matrix
2119 ,var01,var02,var03,var04,var05,var06,var07,var08
2120 var01,32.490,1.539,-29.469,11.902,4.309,8.464,15.390,1.454
2121 var02,1.539,2.250,-5.992,2.697,.672,1.013,2.349,.653
2122 var03,-29.469,-5.992,552.250,-19.082,-7.896,-17.977,-25.380,-1.763
2123 var04,11.902,2.697,-19.082,33.640,3.573,6.264,10.022,1.740
2124 var05,4.309,.672,-7.896,3.573,7.840,2.646,1.814,1.134
2125 var06,8.464,1.013,-17.977,6.264,2.646,20.250,9.234,1.350
2126 var07,15.390,2.349,-25.380,10.022,1.814,9.234,29.160,.324
2127 var08,1.454,.653,-1.763,1.740,1.134,1.350,.324,2.250
2128
2129 Table: Communalities
2130 ,Initial
2131 var01,32.490
2132 var02,2.250
2133 var03,552.250
2134 var04,33.640
2135 var05,7.840
2136 var06,20.250
2137 var07,29.160
2138 var08,2.250
2139
2140 Table: Total Variance Explained
2141 ,Initial Eigenvalues,,
2142 Component,Total,% of Variance,Cumulative %
2143 1,556.895,81.881,81.881
2144 2,57.963,8.522,90.403
2145 3,23.576,3.466,93.869
2146 4,16.446,2.418,96.288
2147 5,14.603,2.147,98.435
2148 6,6.831,1.004,99.439
2149 7,2.375,.349,99.788
2150 8,1.440,.212,100.000
2151
2152 Table: Component Matrix
2153 ,Component,,,,,,
2154 ,1,2,3,4,5,6,7
2155 var01,1.394,4.388,1.513,-2.851,.849,.396,.033
2156 var02,.269,.460,-.173,.147,-.146,-.213,.872
2157 var03,-23.489,.725,.058,.003,.022,-.012,.006
2158 var04,.926,4.007,-4.068,.241,-.253,.218,-.026
2159 var05,.363,.829,-.172,-.255,.805,-2.492,.058
2160 var06,.843,2.354,.971,2.425,2.649,.392,.046
2161 var07,1.205,3.948,1.926,1.515,-2.450,-.317,-.087
2162 var08,.085,.319,-.157,-.011,.353,-.341,-.816
2163 ])
2164
2165 AT_CLEANUP
2166
2167
2168
2169 dnl A more realistic example of factor analysis usage.
2170 AT_SETUP([FACTOR correlation matrix])
2171
2172 AT_DATA([correlation-matrix.sps], [dnl
2173 set format = F10.3.
2174
2175 matrix data
2176     variables = rowtype_
2177     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
2178     nepsy_passws_36  morf_verv_36  bnt_actws_36  klankgr_id_36  snelnoe_36  letters_36  ppvt_passws_50  morf_verv_50
2179     nepsy_passws_56  bnt_actws_56  klank_gr_weg_56  snelnoe_56  letters_56
2180     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
2181     / format = upper diagonal .
2182 begin data
2183 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  
2184 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
2185 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 
2186 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
2187 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
2188 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
2189 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
2190 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
2191 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
2192 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
2193 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
2194 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
2195 corr    1.00  .328  .258  .534  .236  -.202  .200  .333  .209  .352  .375  .302  -.119  .272  .062  .203  .042  -.092  .220  .020  .158  .227
2196 corr    1.00  .439  .488  .323  -.213  .287  .507  .427  .493  .522  .298  -.142  .371  .109  .215  .213  -.048  .228  .009  .133  .267
2197 corr    1.00  .437  .381  -.158  .153  .403  .430  .383  .379  .150  -.141  .303  .115  .131  .155  -.170  .206  .039  .193  .254
2198 corr    1.00  .247  -.143  .182  .521  .364  .415  .688  .304  -.185  .327  .188  .211  .202  -.111  .272  .122  .226  .301
2199 corr    1.00  -.150  .229  .296  .249  .329  .255  .210  -.036  .252  .141  .230  .112  -.195  .309  .135  .250  .195
2200 corr    1.00  -.132  -.204  -.162  -.284  -.166  -.189  .294  -.339  -.094  -.218  -.144  .153  -.246  -.128  -.192  -.239
2201 corr    1.00  .151  .132  .166  .195  .387  -.214  .476  .154  .187  .167  -.236  .410  .316  .370  .245
2202 corr    1.00  .388  .479  .591  .294  -.171  .351  .102  .245  .180  .003  .274  .059  .178  .236
2203 corr    1.00  .408  .437  .276  -.153  .353  .251  .318  .229  -.111  .263  .042  .203  .349
2204 corr    1.00  .467  .234  -.249  .382  .199  .313  .197  -.117  .263  .047  .215  .318
2205 corr    1.00  .368  -.199  .441  .198  .224  .197  -.099  .329  .105  .256  .322
2206 corr    1.00  -.211  .473  .233  .253  .268  -.198  .397  .229  .309  .277
2207 corr    1.00  -.310  -.217  -.312  -.203  .227  -.296  -.260  -.276  -.321
2208 corr    1.00  .368  .350  .311  -.313  .578  .338  .521  .458
2209 corr    1.00  .415  .580  -.588  .545  .497  .635  .683
2210 corr    1.00  .570  -.386  .494  .340  .538  .524
2211 corr    1.00  -.366  .427  .299  .498  .506
2212 corr    1.00  -.684  -.620  -.746  -.568
2213 corr    1.00  .759  .900  .555
2214 corr    1.00  .814  .400
2215 corr    1.00  .621
2216 corr    1.00
2217 end data .
2218
2219 factor  matrix in (cor = *) 
2220     / analysis = cdi_actws_16 rdls_actws_16 cdi_actws_20 cdi_actws_26 rdls_actws_26 bnt_actws_36 bnt_actws_56 
2221     / format = default
2222     / criteria = factors (1)
2223     / extraction = pc
2224     / rotation = norotate
2225     / print = initial extraction .
2226
2227 ])
2228
2229 AT_CHECK([pspp -O format=csv correlation-matrix.sps], [0], [dnl
2230 Table: Communalities
2231 ,Initial,Extraction
2232 cdi_actws_16,1.000,.614
2233 rdls_actws_16,1.000,.660
2234 cdi_actws_20,1.000,.695
2235 cdi_actws_26,1.000,.650
2236 rdls_actws_26,1.000,.536
2237 bnt_actws_36,1.000,.443
2238 bnt_actws_56,1.000,.316
2239
2240 Table: Total Variance Explained
2241 ,Initial Eigenvalues,,,Extraction Sums of Squared Loadings,,
2242 Component,Total,% of Variance,Cumulative %,Total,% of Variance,Cumulative %
2243 1,3.914,55.908,55.908,3.914,55.908,55.908
2244 2,1.320,18.852,74.760,,,
2245 3,.716,10.223,84.983,,,
2246 4,.422,6.030,91.012,,,
2247 5,.278,3.977,94.989,,,
2248 6,.216,3.088,98.077,,,
2249 7,.135,1.923,100.000,,,
2250
2251 Table: Component Matrix
2252 ,Component
2253 ,1
2254 cdi_actws_16,.784
2255 rdls_actws_16,.812
2256 cdi_actws_20,.834
2257 cdi_actws_26,.806
2258 rdls_actws_26,.732
2259 bnt_actws_36,.666
2260 bnt_actws_56,.562
2261 ])
2262
2263 AT_CLEANUP
2264
2265
2266 AT_SETUP([FACTOR bad input])
2267
2268 dnl Test for a crash 
2269 AT_DATA([bad-input.sps], [dnl
2270 set format = F10.3.
2271 MATRIX DATA VARIABLES S1 ROWTYPE_ V1 TO V3 /SPLIT=S1.
2272 BEGIN DATA
2273 0 MEAN 2 4 3
2274 0 SD 1 2 3
2275 0 N 9 9 9
2276 0 KORR 1
2277 0 CORV .6 1
2278 0 CORR .7 .8 1
2279 1 MEAN 9 8 7
2280 1 SD 5 6 7
2281 1 N 9 9 9
2282 1 CORR 1
2283 X CORR .4 1
2284 1 CORR .3 .2 1
2285 END DATA.
2286
2287 EXECUTE.
2288
2289 FACTOR MATRIX IN (CORR =!*)
2290        /PRINT = CORRELATION
2291        .
2292 ])
2293
2294 AT_CHECK([pspp -O format=csv bad-input.sps], [1], [ignore])
2295
2296 AT_CLEANUP
2297
2298
2299 AT_SETUP([FACTOR anti-image matrix])
2300
2301 AT_DATA([anti-image-matrix.sps], [dnl
2302 SET FORMAT=F20.3 .
2303 matrix data
2304  variables = rowtype_ viq piq pa ran piatwr  piatc
2305  / n = 476
2306  / format = lower diagonal .
2307 begin data
2308 mean  96.88  100.51  -1.73  -0.94  -2.52 -1.85
2309 sd    10.97   11.19   1.19   0.88   0.85  0.97
2310 corr    1.00
2311 corr    0.38  1.00
2312 corr    0.26  0.24  1.00
2313 corr    0.16  0.17  0.34  1.00
2314 corr    0.25  0.07  0.46  0.38  1.00
2315 corr    0.37  0.22  0.39  0.30  0.59   1.00
2316 end data.
2317
2318 factor matrix = in (cor = *) 
2319  / analysis = viq piq pa ran piatwr piatc
2320  / format = sort 
2321  / extraction = pc
2322  / rotation = norotate
2323  / print = aic
2324 ])
2325
2326 AT_CHECK([pspp -O format=csv anti-image-matrix.sps], [0], [dnl
2327 Table: Anti-Image Matrices
2328 ,,viq,piq,pa,ran,piatwr,piatc
2329 Anti-image Covariance,viq,.762,-.248,-.048,.008,-.031,-.143
2330 ,piq,-.248,.807,-.117,-.081,.108,-.071
2331 ,pa,-.048,-.117,.711,-.125,-.173,-.060
2332 ,ran,.008,-.081,-.125,.808,-.143,-.035
2333 ,piatwr,-.031,.108,-.173,-.143,.551,-.265
2334 ,piatc,-.143,-.071,-.060,-.035,-.265,.581
2335 Anti-image Correlation,viq,.741,-.316,-.066,.011,-.048,-.215
2336 ,piq,-.316,.624,-.154,-.100,.163,-.103
2337 ,pa,-.066,-.154,.811,-.165,-.277,-.093
2338 ,ran,.011,-.100,-.165,.825,-.214,-.051
2339 ,piatwr,-.048,.163,-.277,-.214,.675,-.469
2340 ,piatc,-.215,-.103,-.093,-.051,-.469,.729
2341
2342 Table: Component Matrix
2343 ,Component,,,,
2344 ,1,2,3,4,5
2345 piatc,.774,.122,-.368,.365,-.322
2346 piatwr,.754,.418,.442,.219,-.115
2347 pa,.707,.124,-.117,-.161,.256
2348 piq,.456,-.733,.122,-.289,-.377
2349 viq,.589,-.539,.033,.298,.457
2350 ran,.592,.262,-.069,-.638,.096
2351 ])
2352
2353 AT_CLEANUP
2354
2355
2356 AT_SETUP([FACTOR Kaiser-Meyer-Olkin])
2357
2358 AT_DATA([kmo.sps], [dnl
2359 SET FORMAT=F20.3 .
2360 matrix data
2361  variables = rowtype_ viq piq pa ran piatwr  piatc
2362  / n = 476
2363  / format = lower diagonal .
2364 begin data
2365 mean  96.88  100.51  -1.73  -0.94  -2.52 -1.85
2366 sd    10.97   11.19   1.19   0.88   0.85  0.97
2367 corr    1.00
2368 corr    0.38  1.00
2369 corr    0.26  0.24  1.00
2370 corr    0.16  0.17  0.34  1.00
2371 corr    0.25  0.07  0.46  0.38  1.00
2372 corr    0.37  0.22  0.39  0.30  0.59   1.00
2373 end data.
2374
2375 factor matrix = in (cor = *) 
2376  / analysis = viq piq pa ran piatwr piatc
2377  / extraction = pc
2378  / rotation = norotate
2379  / print = kmo
2380 ])
2381
2382 AT_CHECK([pspp -O format=csv kmo.sps], [0], [dnl
2383 Table: KMO and Bartlett's Test
2384 Kaiser-Meyer-Olkin Measure of Sampling Adequacy,,.730
2385 Bartlett's Test of Sphericity,Approx. Chi-Square,602.673
2386 ,df,15
2387 ,Sig.,.000
2388
2389 Table: Component Matrix
2390 ,Component,,,,
2391 ,1,2,3,4,5
2392 viq,.589,-.539,.033,.298,.457
2393 piq,.456,-.733,.122,-.289,-.377
2394 pa,.707,.124,-.117,-.161,.256
2395 ran,.592,.262,-.069,-.638,.096
2396 piatwr,.754,.418,.442,.219,-.115
2397 piatc,.774,.122,-.368,.365,-.322
2398 ])
2399
2400 AT_CLEANUP