Added result_class parameter to tab_double and updated all callers. Removed tab_fixed
[pspp] / tests / language / stats / factor.at
index fb2bb22519f3c28a35aac4608f667644bc52b824..e90e862f9a19c97d0c24b5f41f6b7085734de3c9 100644 (file)
@@ -1814,10 +1814,11 @@ BEGIN DATA
 END DATA
 
 FACTOR /VARIABLES=TRAIT1 TO TRAIT5
-    /ROTATION=NOROTATE    /* NOROTATE may have caused the problem. */
-    /EXTRACTION=PC
-    /PRINT=ALL
+    /ROTATION=NOROTATE /* NOROTATE may have caused the problem. */
+    /EXTRACTION=PC
+    /PRINT=DEFAULT DET UNIVARIATE ROTATION SIG CORRELATION.
 ])
+
 AT_CHECK([pspp -O format=csv factor-norotate.sps], [0], [dnl
 Table: Descriptive Statistics
 ,Mean,Std. Deviation,Analysis N
@@ -1827,12 +1828,6 @@ TRAIT3,6.71,2.71,7
 TRAIT4,6.71,3.61,7
 TRAIT5,7.29,2.66,7
 
-Table: KMO and Bartlett's Test
-Kaiser-Meyer-Olkin Measure of Sampling Adequacy,,1.00
-Bartlett's Test of Sphericity,Approx. Chi-Square,NaN
-,df,10
-,Sig.,NaN
-
 Table: Correlation Matrix
 ,,TRAIT1,TRAIT2,TRAIT3,TRAIT4,TRAIT5
 Correlations,TRAIT1,1.00,.30,.88,1.00,.54
@@ -1840,11 +1835,11 @@ Correlations,TRAIT1,1.00,.30,.88,1.00,.54
 ,TRAIT3,.88,-.02,1.00,.87,.13
 ,TRAIT4,1.00,.33,.87,1.00,.54
 ,TRAIT5,.54,.84,.13,.54,1.00
-Sig. (1-tailed),TRAIT1,,.26,.00,.00,.10
-,TRAIT2,.26,,.48,.24,.01
-,TRAIT3,.00,.48,,.01,.39
-,TRAIT4,.00,.24,.01,,.10
-,TRAIT5,.10,.01,.39,.10,
+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,,,,,
 
 Table: Communalities
@@ -1874,3 +1869,56 @@ TRAIT4,.97,.21,-.04,.00
 TRAIT5,.70,-.67,-.23,.00
 ])
 AT_CLEANUP
+
+
+
+dnl Fixes a bug in the way that the /CRITERIA = ITERATE option was interpreted.
+dnl http://lists.gnu.org/archive/html/bug-gnu-pspp/2013-09/msg00036.html
+AT_SETUP([FACTOR /CRITERIA=ITERATE])
+AT_DATA([factor-iterate.sps], [dnl
+set format = F20.3.
+data list notable list /x y z *.
+begin data.
+1.00    5.00    3.00
+2.00    2.00    2.00
+3.00    1.00    1.00
+4.00    4.00    5.00
+5.00    3.00    9.00
+6.00    6.00    4.00
+7.00    7.00    6.00
+8.00    8.00    8.00
+9.00    9.00    7.00
+end data.
+
+FACTOR
+ /VARIABLES= x y z
+ /CRITERIA = MINEIGEN (1) ITERATE (25)
+ /EXTRACTION =PAF
+ /METHOD = CORRELATION
+ /PRINT = INITIAL EXTRACTION
+ /CRITERIA = ITERATE (0)
+ /ROTATION = NOROTATE.
+])
+
+AT_CHECK([pspp -O format=csv factor-iterate.sps], [0], [dnl
+Table: Communalities
+,Initial,Extraction
+x,.735,.979
+y,.640,.653
+z,.514,.523
+
+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,,,
+
+Table: Factor Matrix
+,Factor
+,1
+x,.990
+y,.808
+z,.723
+])
+AT_CLEANUP
\ No newline at end of file