From: John Darrington Date: Tue, 18 May 2010 15:31:46 +0000 (+0200) Subject: Added tests for the FACTOR command X-Git-Tag: v0.7.5~25^2~1 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29653adc8b41d41600f70132e02244aa57ae9dbc;p=pspp-builds.git Added tests for the FACTOR command --- diff --git a/tests/automake.mk b/tests/automake.mk index a342e549..9b09474c 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -422,6 +422,7 @@ TESTSUITE_AT = \ tests/language/stats/autorecode.at \ tests/language/stats/crosstabs.at \ tests/language/stats/descriptives.at \ + tests/language/stats/factor.at \ tests/language/stats/frequencies.at \ tests/language/xforms/compute.at \ tests/language/xforms/recode.at \ diff --git a/tests/language/stats/factor.at b/tests/language/stats/factor.at new file mode 100644 index 00000000..43825c86 --- /dev/null +++ b/tests/language/stats/factor.at @@ -0,0 +1,1753 @@ +AT_BANNER([FACTOR procedure]) + +AT_SETUP([FACTOR extraction=paf method=correlation]) +dnl This example is based on data from http://www.ats.ucla.edu/stat/Spss/output/factor1.htm + +AT_DATA([factor.sps], + [set format = F11.3. + +data list notable fixed /question13 to question24 1-12. +begin data. +555555535543 +544453434443 +545555544444 +444442444433 +554545554554 +554455454455 +555554555244 +554455544443 +555554434344 +544454544344 +555545555555 +555454544455 +555445544455 +455544443343 +544454344344 +555555555455 +555554454455 +555555554445 +555555554555 +545534553343 +555555535554 +555544444445 +545544334433 +554555434443 +555555544454 +555445545453 +555554434244 +444444433233 +545555454443 +554443434243 +444534334333 +454534444332 +555455353444 +555544443243 +555554543243 +555544444343 +445444434443 +555555555544 +444444434340 +455044434334 +555555533433 +554554535040 +434533334232 +443232444432 +555555555555 +555555554544 +555544444445 +444224343344 +444554454355 +444434332433 +555555555555 +043243432433 +444443334333 +453443433434 +443342332232 +554434434533 +444344434443 +444444434443 +554552434133 +453334332432 +444445554444 +431232332223 +555555555544 +544445543443 +444455535543 +444444444433 +444444543243 +555431443333 +444443433433 +444433433443 +454334444433 +111111111544 +444423442433 +555443333353 +555543334344 +055454400000 +555454444355 +555555555555 +055544533333 +555554555554 +555555535554 +555555545355 +555555555455 +555544545543 +555554404455 +555454435454 +555555535554 +555555555555 +555443433544 +555554435454 +555555545344 +555555535454 +555445535453 +444444333544 +555554434444 +455454434454 +555555535555 +554545534455 +555555555443 +454443434444 +555553334444 +555554545454 +555555555555 +555554554454 +555555555555 +544545534544 +555555534454 +555555555455 +555554535544 +555555535555 +555451234443 +555444444544 +555544434354 +555545533444 +555554534443 +545554434554 +554433444433 +544432233524 +411111111111 +445423442233 +555543433344 +444443342233 +555555534455 +545442434223 +554553352333 +544554554445 +555555435455 +444334304234 +455453444434 +444443443245 +555552232132 +555434324345 +544444434344 +534344344444 +445555555344 +444343442132 +444444434344 +444444554334 +444545444333 +434442343224 +443443433233 +555551555554 +544544434444 +454544434433 +555555535434 +555555555555 +455544444444 +454444434233 +555555544344 +454445544445 +444444554434 +555455455443 +555454425444 +444454434443 +544443433233 +444543434433 +555553545354 +544444444433 +444445434433 +555533353333 +555434234333 +444314222411 +555555555555 +455545534443 +455045534433 +555545444444 +455544243543 +444421113343 +554444534444 +555555544554 +555334434452 +555544543455 +555554434554 +555445554454 +555555545344 +555555555555 +554543334245 +554441233333 +555554334545 +555555535544 +555555554554 +555445444543 +444424544432 +444425544333 +555434344443 +555533233223 +544433442343 +555555555555 +555445452234 +555444555444 +555444544455 +555544354554 +545445555555 +555555555555 +455443342232 +555555544454 +455534443455 +555555555055 +444554333244 +444445434543 +555554544455 +444443444434 +444444434445 +334231314323 +444444434433 +555554444443 +444444434443 +555455434444 +444444444444 +555455435455 +444444434344 +444543433232 +544443334454 +555544433244 +534443324224 +555555544444 +444443434444 +555553444344 +443434443333 +444444434333 +554445444343 +444443344434 +445555544543 +555554443443 +322232403322 +444444444433 +444445444443 +444454534445 +544344444344 +554445534544 +555555555554 +555544432333 +444444444443 +555555555554 +455555555554 +555555555543 +555555555544 +555554445555 +444335544455 +555555555555 +555454444454 +555455544454 +444445444444 +555555555555 +555455454554 +555454544554 +555555555455 +555555554444 +444444544434 +334334443333 +422224222211 +121512011111 +443444432332 +434335533344 +444443543433 +554454443453 +555555545454 +555555555344 +555555555554 +555555334555 +454445554444 +454545534444 +555554555444 +455444534455 +555544554544 +444444444444 +555424423133 +222433443224 +544544532344 +545554544544 +555532544144 +444432343433 +434545554545 +444344505443 +555555555544 +555554555344 +444531113112 +555554333133 +455433233233 +354354434345 +454534433433 +433112332321 +555445433333 +454343434143 +555554445555 +455423334322 +443333332222 +444443444443 +553432224134 +444223432233 +454324425444 +344434514443 +555552415255 +354332543353 +444531333233 +443433334133 +444444444433 +444444445533 +445133212223 +343433432213 +442333333332 +345455535244 +443211121122 +555445444444 +555555544344 +453243332232 +443543422533 +554444434344 +554444333444 +555555335343 +444231121133 +454433332233 +455524434244 +554433224354 +555455555444 +454444424444 +554242232134 +555553315443 +555553333454 +455421434211 +111111151111 +454443203123 +454243334132 +355332213144 +554534334134 +555543434355 +555543433255 +444441223334 +555443143255 +444444444454 +444442323544 +454443434343 +445453434444 +454455554433 +554532342234 +444442243233 +444442343334 +555443433444 +555543253444 +554554444455 +555543355344 +555444445444 +434443204222 +444432444234 +222142441111 +111111141111 +334334454433 +555354552543 +433411122112 +455534504444 +543211224233 +344333332532 +344443233333 +444424432434 +555555544454 +555555554544 +555444444444 +555443533443 +555554544344 +555554444444 +544543433343 +444445434444 +555555555555 +555443333233 +545444534454 +555454434343 +555453434544 +544334444333 +555443443444 +555555534544 +444444444433 +555543433343 +555444445334 +555543442433 +455444334443 +554443434443 +555254500544 +555444433344 +555555535544 +444443532232 +544443433433 +555555535544 +555455454444 +555455445544 +544444534433 +555555555554 +555553533444 +555555555554 +555554434343 +555455544443 +555554444443 +555454444445 +333222333223 +444443544233 +543443534433 +555545454533 +444444404033 +455454504543 +455555555454 +454443344343 +555553435244 +555543544444 +555553343044 +444443444433 +445543434434 +555554433545 +555554455445 +455553333234 +555552344243 +444141212213 +444443504234 +445544253444 +555554354555 +534552234543 +555554544544 +444233404224 +555554534444 +444443444344 +422442434324 +554434434344 +444444434334 +443433432444 +555454435344 +252423332214 +454544434434 +444444444244 +555554544445 +443222432333 +555544444332 +545555543445 +554544334444 +555445555544 +554343434433 +555555535554 +444554444333 +553544343534 +555553254433 +555555554554 +544443443344 +555443444344 +544432144123 +555555555555 +555555555354 +555555535545 +455454434444 +455455534445 +455555554455 +555553545445 +445545544444 +545345553555 +444445444433 +443435433433 +555554545353 +444443232223 +444444434433 +555555545454 +555554444343 +555554444443 +434544333422 +444443434343 +555555455443 +555544434343 +455545534444 +555555555553 +444443343434 +555555555445 +433444444434 +344221512132 +333421132223 +333444443444 +435544545533 +444335544443 +333323223323 +334434332333 +444422323213 +324433443423 +555555554555 +555452424444 +555544434444 +555544443343 +555445545453 +555555344453 +555544545550 +454443434334 +444332233344 +555554332344 +554444433444 +555554555554 +555555543544 +444442443132 +555555545555 +544553435533 +044044444444 +444443434533 +555454433434 +555555555454 +555555555555 +454544434444 +444444434333 +554555455554 +555555543444 +423331124132 +445445534455 +555555555554 +444535554434 +555555555554 +354443422232 +555545535443 +555555555555 +555455444453 +455434443333 +455444443233 +343322434411 +555555555534 +453442432333 +445554434544 +345444443333 +454554554355 +444434453434 +555555454443 +555443343341 +545553343433 +222343222201 +444433434443 +535555555544 +552541442423 +545433343334 +455445433443 +444444433433 +455543343433 +434444432333 +444545444444 +555554534444 +452444434433 +454443432533 +555453334433 +444442233432 +555555553433 +545555545445 +335543222333 +554554344445 +243424442212 +133222432411 +343434534233 +222222212211 +445455554434 +455554453344 +223334424434 +555355555544 +455544554434 +544455555444 +444444444444 +444444444344 +444334444444 +444444444434 +555455534243 +555555545555 +555555555555 +444443534343 +555554544444 +555555555454 +444434433433 +455445544444 +555544544455 +444333433333 +455443445343 +444432442444 +443334451543 +555554455555 +555444444444 +555555555455 +555555555554 +555454345154 +555555555555 +555555555455 +555554454544 +454444454544 +554443334544 +455555402535 +555554531534 +455545544554 +444423444223 +555444334533 +455554445243 +453444334344 +555555555554 +555555555455 +555555555554 +455443334344 +555555253555 +555554433454 +555444344455 +550030034433 +555444233343 +555343222133 +555555555554 +555555243243 +555555555355 +555554345555 +555443434454 +545543133133 +555443334154 +444444344454 +555555242254 +555554444344 +545443334454 +554444132454 +555455143154 +555554453044 +555555555455 +555534335454 +555555245555 +545543333444 +555555355454 +555353145133 +555553043454 +555555354554 +555543434454 +555444324454 +444444203443 +555552233355 +555555445455 +555500034354 +555354354444 +555555555555 +555543334144 +555555005254 +454444344254 +555555555554 +555555555255 +555555555455 +444444242243 +555554445154 +444444234333 +555555553455 +444422224243 +555545443344 +545552133143 +555455044344 +555555455555 +555555545454 +454433343144 +555555555555 +555455255155 +555555454455 +555555424455 +555555355555 +555444444455 +555555454455 +544411211314 +223322441123 +444223434233 +444441121232 +555555535555 +454445533444 +434442434433 +545355554454 +555542544333 +445545555444 +321000001011 +444444444444 +333223321322 +444232433233 +425432523122 +455555555544 +555555545555 +555555534354 +554554444243 +555554343443 +444443434333 +555224252443 +555544433433 +344544434423 +555554434344 +555542134233 +444344434444 +445443433233 +455343333434 +455443333445 +355344434433 +234234433333 +445444444445 +455535535545 +443423234443 +455544334544 +345441333323 +445444533433 +455554443355 +445444433243 +455454453444 +444244444444 +554244544154 +555555555555 +454343444444 +555444444344 +545455534454 +555555555555 +555554534454 +555254555444 +544354544453 +553454534445 +555454445355 +545253554454 +433342322233 +544444444443 +555455445544 +424322433233 +444424222233 +555355555544 +000000000000 +555455345344 +000055505450 +434333444333 +444445444444 +555555555545 +555554455545 +555455435533 +544544444243 +444331232323 +555555554444 +443332323233 +444224342433 +555555555544 +433443342333 +555445504554 +555545555544 +555555535555 +555555535345 +454443433333 +555444444555 +444443232435 +555433444443 +555443434543 +555555535555 +555555533544 +555543234444 +433432332221 +443433544233 +443443333334 +444424433444 +552444333123 +233332232211 +223422221122 +434433414133 +332323333102 +552544223222 +542423343232 +555552534132 +455554544134 +433523533132 +433333433433 +435434543333 +434553433444 +555544434345 +443543443433 +555555542344 +544444553144 +555544544243 +535443441342 +344555444333 +444444443333 +443443433432 +545554534544 +443533433433 +333443432223 +333333433123 +322432122213 +555555555555 +554555444433 +444543443234 +444444433433 +452555534433 +244444444233 +433442422232 +555555535555 +555555554455 +555554545244 +555555355455 +555555555555 +555555555555 +444433323233 +555455455455 +434445444433 +555554444455 +454444543445 +555555535455 +555545554455 +555555555555 +555555555555 +555443344353 +455543304132 +444443444433 +555555555355 +434433443333 +444434444433 +444444444433 +555555555555 +445553443323 +445444444444 +555554444054 +455555554543 +555555535555 +555554445454 +555444444443 +555555555454 +555554344455 +555555454454 +554444444454 +555555555353 +555545544454 +553545332223 +444424444332 +545555543433 +555444433444 +555555444445 +444444424433 +444444543434 +124113531311 +555554534543 +555343333333 +545444544344 +555444534444 +555544543444 +555455544443 +444324402121 +555554534544 +555455544444 +555555544454 +444334404433 +555443534444 +555545554444 +555555555555 +455333233433 +455444433433 +455444444444 +444235442443 +555443343433 +444445453444 +454345453432 +555555453444 +344433322323 +444443444244 +444442343133 +554445432233 +555555544444 +555555534444 +555554455554 +454443334244 +544443333233 +444445534445 +444432134121 +555555332243 +555555544433 +555554434444 +454543534233 +454432432343 +444424432433 +545553335344 +555443434344 +454443433333 +555553534444 +554544434355 +552532421235 +454543433434 +544544343234 +555552334125 +555543455555 +443442334222 +554443444344 +555554543334 +555552342444 +554443433333 +443444434445 +555554533344 +442412242121 +454543343244 +445554433344 +444443333433 +444443433333 +444433333334 +444444334444 +432321102223 +444444434443 +444444434343 +454531432331 +445543433434 +554554434554 +334253232333 +444443434244 +444433443234 +444433334334 +444443433333 +553434303222 +454443434244 +444445544444 +443441133433 +444432232133 +444444404344 +444444333243 +455543124243 +555544532344 +444432333132 +554553434244 +454443443333 +433111121111 +555555555544 +444432433222 +444443433233 +443332332133 +445344453243 +444444405434 +554554434343 +455344534443 +444444400434 +444444344344 +544554533443 +555554443455 +555555544544 +555554534444 +323123232311 +444344344443 +555554555544 +343323332333 +444443434444 +444442214340 +555434434444 +455543343444 +445432434433 +455553434455 +243321332322 +444422332332 +555533454444 +555544443433 +354422431422 +333322421211 +444443432434 +344422431322 +333342222321 +444443454433 +443443444433 +553434531334 +554434552343 +545455553544 +554455554443 +555555555533 +555555554543 +454454544433 +555444532143 +554545544443 +444233442434 +544444434234 +554344432233 +555345533355 +554554544433 +455444444344 +555554554554 +555554545555 +444433534434 +444444421134 +334333333333 +334443443343 +122333441413 +434444333333 +444344433233 +444333332143 +555154344133 +324344333223 +244444402233 +454443433543 +444344433344 +455555445555 +555555544433 +454544434443 +344535554533 +333435443433 +444444554544 +343434443333 +544553544455 +555444444455 +244333332222 +333441232233 +544433433433 +555544343344 +344211142124 +442442232113 +433432332223 +333424322222 +444443333233 +344321232223 +442434342422 +545555535555 +455454434454 +455355544444 +454444444445 +555554432430 +555444344144 +455534342234 +555555554354 +213332443111 +555545434433 +555554424444 +443434443433 +555555554443 +555555555544 +435535554433 +555455545443 +555555554533 +554545443455 +555553333233 +434432232323 +443443333433 +443544231534 +434533334334 +555555535544 +555544444445 +555555555555 +555555555555 +555555555555 +555555555555 +544555544544 +555555545555 +545555534354 +445444344344 +555555555555 +444443343334 +555444440000 +555555555554 +555555545455 +454434444345 +555445544443 +555554535433 +454445555555 +555444444355 +555555555555 +555555555555 +555555555555 +555555554555 +555455554455 +454435544255 +545543342243 +555544355345 +555555455354 +435553244333 +555555443454 +444444433445 +121422433111 +555554543244 +555444554444 +444203444433 +344342553322 +554445554344 +545445454454 +444245504233 +334335555533 +554355544444 +444445545444 +555555555344 +454544543233 +444455532434 +555544354243 +535444554433 +444444444444 +455555553243 +244442343235 +554544504043 +444435553433 +455553434354 +555444343314 +555553344453 +555555555544 +544444444433 +434434550033 +555455544444 +455445534344 +454445444554 +555555555555 +555555555555 +555555555454 +555455545412 +334433343132 +555454455455 +555554454443 +555555555555 +555555553433 +555555555555 +555555445555 +555545445455 +555555545554 +555555555555 +445455554443 +555445554433 +555555554445 +555553333144 +555554455143 +554454445444 +555555554533 +334422433422 +555554434444 +433531133222 +443432342224 +555544554433 +553434333333 +555543334443 +444443344323 +555555555555 +555554545344 +555555545554 +555342434333 +444443333233 +444544435444 +555555555555 +555455554354 +555555405054 +555555555555 +554555545545 +555555555544 +555545454344 +555555455555 +433444444343 +454555554444 +453555554544 +444445554444 +544455555455 +555343434343 +555553444454 +555444434443 +555555555444 +555555545443 +555444534455 +555555555555 +444443443434 +555445533543 +555555555444 +555544444354 +445444544243 +555554555455 +555555455444 +555555555544 +555555555454 +554445545454 +555555555543 +344444434443 +555555454453 +455444443433 +344244434433 +355234452132 +555445545455 +444444444444 +455444454433 +555555555555 +344233341155 +333334433233 +444433434333 +444233443334 +454344544444 +555554245253 +444444333344 +554544434333 +555444443343 +555554555445 +005555555544 +554444445244 +555455555555 +555555555444 +444444444433 +555555555444 +555555544454 +555555555544 +444444434444 +555555535553 +545534543334 +554554534533 +555555555554 +554554544544 +454541231221 +555555535544 +445344334432 +444444344333 +555555534444 +555555545555 +443434544232 +545544433343 +343234434333 +444444443233 +555454444455 +555455535455 +554433442243 +444444544454 +554545554544 +454444444444 +554455534455 +555555544355 +555445555555 +555444534444 +455454534444 +555555555544 +444444444455 +454455554344 +443244442233 +350554554434 +455444535343 +344233443433 +454444535545 +244222232232 +245345554344 +355344444443 +555455555444 +444434444233 +334323444322 +333234443233 +455455554454 +555554544434 +555355555444 +444444544443 +555554555544 +344231224131 +444443434433 +454344444431 +555554555553 +454544444443 +444443443532 +334323423222 +455555545554 +555542434443 +554444444443 +554444534344 +555443454555 +555555534554 +444434443343 +444234432233 +334323311333 +444443443233 +355424552242 +233335323322 +234233443333 +123353532334 +444345555244 +332222433422 +545445555443 +555555555555 +555554444443 +455445554455 +455455555455 +555555555555 +444443433445 +555455555544 +355453434232 +555555554344 +444433433433 +434322242112 +444444433433 +444445444544 +555444535444 +544444444443 +454544344334 +454444334333 +434433433332 +334434423423 +444455552233 +442442342233 +445433433343 +555555444355 +555555555555 +455554555545 +555445544444 +544444434443 +555555535333 +554444444344 +555554554445 +345433334121 +555555555554 +545444444233 +555555544455 +555554545555 +555555455555 +555555545555 +555554544455 +444444444333 +544544544445 +555445544544 +555455444455 +555455555454 +554455535444 +453423442244 +444443444444 +454444333333 +555555555542 +555555555543 +555555555544 +555555535534 +555555555444 +444443423333 +555444444444 +555445544453 +444444444443 +555555443444 +444443444333 +554554154344 +555543353333 +554445443333 +555555553455 +554534444243 +554555554545 +555544443443 +555554555555 +555425552422 +555555555555 +454421121321 +555454453433 +555555554443 +244224431223 +455444453444 +454345544455 +344235545044 +555555555544 +555553325554 +554554444244 +555545544544 +454555554545 +444444545444 +545544444455 +454344445443 +545555554453 +444444444443 +545554554453 +555453434444 +005434434454 +455555455544 +555555555554 +455542444433 +545543444555 +445545445444 +555553325454 +555554555554 +444544444443 +555555444454 +443332443222 +454444443444 +344333433332 +555455444455 +555555555445 +555555534454 +445433432343 +555554434444 +555555545444 +544545434455 +454435543444 +555555555555 +555455554555 +555555544554 +555553554455 +555555555555 +545454545444 +555555445555 +554534343444 +555545443343 +545454334444 +554445544544 +555455354344 +555555555355 +554445544354 +455554444444 +555555553543 +555554444444 +555543233444 +555554344433 +333334441223 +543554344434 +055541243244 +555555555544 +555555533444 +555445444544 +444335343433 +544434344333 +544435533333 +444444443333 +555555555554 +555552343233 +444444444433 +544444434444 +555555545555 +555555555554 +445244434444 +445444434444 +445555554521 +443444543343 +444433343434 +355444433442 +555543444455 +555444334544 +555555555555 +554555545555 +555555554555 +555555555555 +454444343445 +444444433444 +354445443444 +555334242132 +455445555543 +254153343433 +354244443333 +554455444344 +343255535444 +455454555553 +555455545555 +444343433343 +343323443323 +455444444424 +555544444455 +343434543444 +555555555544 +555554534243 +555554543344 +555455555544 +555443344343 +444445533133 +555543534555 +444554444444 +444002323320 +444232322222 +244344424441 +555443344334 +555555555555 +555444534443 +555555555555 +555555555550 +455555554555 +555555555555 + +end data. + +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 + /print univariate det correlation + /format blank(.30) + /plot eigen + /criteria factors(3) + /extraction paf + /method = correlation. +]) + +AT_CHECK([pspp -O format=csv factor.sps], [0], + [Table: Descriptive Statistics +,Mean,Std. Deviation,Analysis N +question13,4.462,.729,1365 +question14,4.525,.700,1365 +question15,4.445,.732,1365 +question16,4.281,.829,1365 +question17,4.166,.895,1365 +question18,3.930,1.034,1365 +question19,4.077,.963,1365 +question20,3.777,.909,1365 +question21,3.774,.984,1365 +question22,3.607,1.116,1365 +question23,3.813,.957,1365 +question24,3.666,.926,1365 + +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 +,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 +,question17,.577,.552,.587,.586,1.000,.555,.449,.417,.595,.450,.613,.521 +,question18,.409,.433,.457,.405,.555,1.000,.627,.521,.554,.536,.569,.474 +,question19,.286,.320,.359,.335,.449,.627,1.000,.446,.499,.484,.444,.374 +,question20,.304,.315,.356,.317,.417,.521,.446,1.000,.425,.383,.410,.357 +,question21,.476,.449,.509,.452,.595,.554,.499,.425,1.000,.507,.598,.500 +,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,,,,,,,,,,,, + +Table: Factor Matrix +,Factor,, +,1,2,3 +question13,.713,.398, +question14,.703,.339, +question15,.721,, +question16,.648,, +question17,.783,, +question18,.740,-.345, +question19,.616,-.415, +question20,.550,, +question21,.732,, +question22,.613,, +question23,.819,,.345 +question24,.695,,.386 +]) + +AT_CLEANUP + +AT_SETUP([FACTOR extraction=pc method=correlation]) +dnl This example is from http://www.ats.ucla.edu/stat/spss/whatstat/whatstat.htm + +AT_DATA([factor2.sps], + [set format = F11.3. + + +data list notable list /id female race ses schtyp prog read write math science socst. +begin data. + 70.00 .00 4.00 1.00 1.00 1.00 57.00 52.00 41.00 47.00 57.00 +121.00 1.00 4.00 2.00 1.00 3.00 68.00 59.00 53.00 63.00 61.00 + 86.00 .00 4.00 3.00 1.00 1.00 44.00 33.00 54.00 58.00 31.00 +141.00 .00 4.00 3.00 1.00 3.00 63.00 44.00 47.00 53.00 56.00 +172.00 .00 4.00 2.00 1.00 2.00 47.00 52.00 57.00 53.00 61.00 +113.00 .00 4.00 2.00 1.00 2.00 44.00 52.00 51.00 63.00 61.00 + 50.00 .00 3.00 2.00 1.00 1.00 50.00 59.00 42.00 53.00 61.00 + 11.00 .00 1.00 2.00 1.00 2.00 34.00 46.00 45.00 39.00 36.00 + 84.00 .00 4.00 2.00 1.00 1.00 63.00 57.00 54.00 58.00 51.00 + 48.00 .00 3.00 2.00 1.00 2.00 57.00 55.00 52.00 50.00 51.00 + 75.00 .00 4.00 2.00 1.00 3.00 60.00 46.00 51.00 53.00 61.00 + 60.00 .00 4.00 2.00 1.00 2.00 57.00 65.00 51.00 63.00 61.00 + 95.00 .00 4.00 3.00 1.00 2.00 73.00 60.00 71.00 61.00 71.00 +104.00 .00 4.00 3.00 1.00 2.00 54.00 63.00 57.00 55.00 46.00 + 38.00 .00 3.00 1.00 1.00 2.00 45.00 57.00 50.00 31.00 56.00 +115.00 .00 4.00 1.00 1.00 1.00 42.00 49.00 43.00 50.00 56.00 + 76.00 .00 4.00 3.00 1.00 2.00 47.00 52.00 51.00 50.00 56.00 +195.00 .00 4.00 2.00 2.00 1.00 57.00 57.00 60.00 58.00 56.00 +114.00 .00 4.00 3.00 1.00 2.00 68.00 65.00 62.00 55.00 61.00 + 85.00 .00 4.00 2.00 1.00 1.00 55.00 39.00 57.00 53.00 46.00 +167.00 .00 4.00 2.00 1.00 1.00 63.00 49.00 35.00 66.00 41.00 +143.00 .00 4.00 2.00 1.00 3.00 63.00 63.00 75.00 72.00 66.00 + 41.00 .00 3.00 2.00 1.00 2.00 50.00 40.00 45.00 55.00 56.00 + 20.00 .00 1.00 3.00 1.00 2.00 60.00 52.00 57.00 61.00 61.00 + 12.00 .00 1.00 2.00 1.00 3.00 37.00 44.00 45.00 39.00 46.00 + 53.00 .00 3.00 2.00 1.00 3.00 34.00 37.00 46.00 39.00 31.00 +154.00 .00 4.00 3.00 1.00 2.00 65.00 65.00 66.00 61.00 66.00 +178.00 .00 4.00 2.00 2.00 3.00 47.00 57.00 57.00 58.00 46.00 +196.00 .00 4.00 3.00 2.00 2.00 44.00 38.00 49.00 39.00 46.00 + 29.00 .00 2.00 1.00 1.00 1.00 52.00 44.00 49.00 55.00 41.00 +126.00 .00 4.00 2.00 1.00 1.00 42.00 31.00 57.00 47.00 51.00 +103.00 .00 4.00 3.00 1.00 2.00 76.00 52.00 64.00 64.00 61.00 +192.00 .00 4.00 3.00 2.00 2.00 65.00 67.00 63.00 66.00 71.00 +150.00 .00 4.00 2.00 1.00 3.00 42.00 41.00 57.00 72.00 31.00 +199.00 .00 4.00 3.00 2.00 2.00 52.00 59.00 50.00 61.00 61.00 +144.00 .00 4.00 3.00 1.00 1.00 60.00 65.00 58.00 61.00 66.00 +200.00 .00 4.00 2.00 2.00 2.00 68.00 54.00 75.00 66.00 66.00 + 80.00 .00 4.00 3.00 1.00 2.00 65.00 62.00 68.00 66.00 66.00 + 16.00 .00 1.00 1.00 1.00 3.00 47.00 31.00 44.00 36.00 36.00 +153.00 .00 4.00 2.00 1.00 3.00 39.00 31.00 40.00 39.00 51.00 +176.00 .00 4.00 2.00 2.00 2.00 47.00 47.00 41.00 42.00 51.00 +177.00 .00 4.00 2.00 2.00 2.00 55.00 59.00 62.00 58.00 51.00 +168.00 .00 4.00 2.00 1.00 2.00 52.00 54.00 57.00 55.00 51.00 + 40.00 .00 3.00 1.00 1.00 1.00 42.00 41.00 43.00 50.00 41.00 + 62.00 .00 4.00 3.00 1.00 1.00 65.00 65.00 48.00 63.00 66.00 +169.00 .00 4.00 1.00 1.00 1.00 55.00 59.00 63.00 69.00 46.00 + 49.00 .00 3.00 3.00 1.00 3.00 50.00 40.00 39.00 49.00 47.00 +136.00 .00 4.00 2.00 1.00 2.00 65.00 59.00 70.00 63.00 51.00 +189.00 .00 4.00 2.00 2.00 2.00 47.00 59.00 63.00 53.00 46.00 + 7.00 .00 1.00 2.00 1.00 2.00 57.00 54.00 59.00 47.00 51.00 + 27.00 .00 2.00 2.00 1.00 2.00 53.00 61.00 61.00 57.00 56.00 +128.00 .00 4.00 3.00 1.00 2.00 39.00 33.00 38.00 47.00 41.00 + 21.00 .00 1.00 2.00 1.00 1.00 44.00 44.00 61.00 50.00 46.00 +183.00 .00 4.00 2.00 2.00 2.00 63.00 59.00 49.00 55.00 71.00 +132.00 .00 4.00 2.00 1.00 2.00 73.00 62.00 73.00 69.00 66.00 + 15.00 .00 1.00 3.00 1.00 3.00 39.00 39.00 44.00 26.00 42.00 + 67.00 .00 4.00 1.00 1.00 3.00 37.00 37.00 42.00 33.00 32.00 + 22.00 .00 1.00 2.00 1.00 3.00 42.00 39.00 39.00 56.00 46.00 +185.00 .00 4.00 2.00 2.00 2.00 63.00 57.00 55.00 58.00 41.00 + 9.00 .00 1.00 2.00 1.00 3.00 48.00 49.00 52.00 44.00 51.00 +181.00 .00 4.00 2.00 2.00 2.00 50.00 46.00 45.00 58.00 61.00 +170.00 .00 4.00 3.00 1.00 2.00 47.00 62.00 61.00 69.00 66.00 +134.00 .00 4.00 1.00 1.00 1.00 44.00 44.00 39.00 34.00 46.00 +108.00 .00 4.00 2.00 1.00 1.00 34.00 33.00 41.00 36.00 36.00 +197.00 .00 4.00 3.00 2.00 2.00 50.00 42.00 50.00 36.00 61.00 +140.00 .00 4.00 2.00 1.00 3.00 44.00 41.00 40.00 50.00 26.00 +171.00 .00 4.00 2.00 1.00 2.00 60.00 54.00 60.00 55.00 66.00 +107.00 .00 4.00 1.00 1.00 3.00 47.00 39.00 47.00 42.00 26.00 + 81.00 .00 4.00 1.00 1.00 2.00 63.00 43.00 59.00 65.00 44.00 + 18.00 .00 1.00 2.00 1.00 3.00 50.00 33.00 49.00 44.00 36.00 +155.00 .00 4.00 2.00 1.00 1.00 44.00 44.00 46.00 39.00 51.00 + 97.00 .00 4.00 3.00 1.00 2.00 60.00 54.00 58.00 58.00 61.00 + 68.00 .00 4.00 2.00 1.00 2.00 73.00 67.00 71.00 63.00 66.00 +157.00 .00 4.00 2.00 1.00 1.00 68.00 59.00 58.00 74.00 66.00 + 56.00 .00 4.00 2.00 1.00 3.00 55.00 45.00 46.00 58.00 51.00 + 5.00 .00 1.00 1.00 1.00 2.00 47.00 40.00 43.00 45.00 31.00 +159.00 .00 4.00 3.00 1.00 2.00 55.00 61.00 54.00 49.00 61.00 +123.00 .00 4.00 3.00 1.00 1.00 68.00 59.00 56.00 63.00 66.00 +164.00 .00 4.00 2.00 1.00 3.00 31.00 36.00 46.00 39.00 46.00 + 14.00 .00 1.00 3.00 1.00 2.00 47.00 41.00 54.00 42.00 56.00 +127.00 .00 4.00 3.00 1.00 2.00 63.00 59.00 57.00 55.00 56.00 +165.00 .00 4.00 1.00 1.00 3.00 36.00 49.00 54.00 61.00 36.00 +174.00 .00 4.00 2.00 2.00 2.00 68.00 59.00 71.00 66.00 56.00 + 3.00 .00 1.00 1.00 1.00 2.00 63.00 65.00 48.00 63.00 56.00 + 58.00 .00 4.00 2.00 1.00 3.00 55.00 41.00 40.00 44.00 41.00 +146.00 .00 4.00 3.00 1.00 2.00 55.00 62.00 64.00 63.00 66.00 +102.00 .00 4.00 3.00 1.00 2.00 52.00 41.00 51.00 53.00 56.00 +117.00 .00 4.00 3.00 1.00 3.00 34.00 49.00 39.00 42.00 56.00 +133.00 .00 4.00 2.00 1.00 3.00 50.00 31.00 40.00 34.00 31.00 + 94.00 .00 4.00 3.00 1.00 2.00 55.00 49.00 61.00 61.00 56.00 + 24.00 .00 2.00 2.00 1.00 2.00 52.00 62.00 66.00 47.00 46.00 +149.00 .00 4.00 1.00 1.00 1.00 63.00 49.00 49.00 66.00 46.00 + 82.00 1.00 4.00 3.00 1.00 2.00 68.00 62.00 65.00 69.00 61.00 + 8.00 1.00 1.00 1.00 1.00 2.00 39.00 44.00 52.00 44.00 48.00 +129.00 1.00 4.00 1.00 1.00 1.00 44.00 44.00 46.00 47.00 51.00 +173.00 1.00 4.00 1.00 1.00 1.00 50.00 62.00 61.00 63.00 51.00 + 57.00 1.00 4.00 2.00 1.00 2.00 71.00 65.00 72.00 66.00 56.00 +100.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 71.00 69.00 71.00 + 1.00 1.00 1.00 1.00 1.00 3.00 34.00 44.00 40.00 39.00 41.00 +194.00 1.00 4.00 3.00 2.00 2.00 63.00 63.00 69.00 61.00 61.00 + 88.00 1.00 4.00 3.00 1.00 2.00 68.00 60.00 64.00 69.00 66.00 + 99.00 1.00 4.00 3.00 1.00 1.00 47.00 59.00 56.00 66.00 61.00 + 47.00 1.00 3.00 1.00 1.00 2.00 47.00 46.00 49.00 33.00 41.00 +120.00 1.00 4.00 3.00 1.00 2.00 63.00 52.00 54.00 50.00 51.00 +166.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 53.00 61.00 51.00 + 65.00 1.00 4.00 2.00 1.00 2.00 55.00 54.00 66.00 42.00 56.00 +101.00 1.00 4.00 3.00 1.00 2.00 60.00 62.00 67.00 50.00 56.00 + 89.00 1.00 4.00 1.00 1.00 3.00 35.00 35.00 40.00 51.00 33.00 + 54.00 1.00 3.00 1.00 2.00 1.00 47.00 54.00 46.00 50.00 56.00 +180.00 1.00 4.00 3.00 2.00 2.00 71.00 65.00 69.00 58.00 71.00 +162.00 1.00 4.00 2.00 1.00 3.00 57.00 52.00 40.00 61.00 56.00 + 4.00 1.00 1.00 1.00 1.00 2.00 44.00 50.00 41.00 39.00 51.00 +131.00 1.00 4.00 3.00 1.00 2.00 65.00 59.00 57.00 46.00 66.00 +125.00 1.00 4.00 1.00 1.00 2.00 68.00 65.00 58.00 59.00 56.00 + 34.00 1.00 1.00 3.00 2.00 2.00 73.00 61.00 57.00 55.00 66.00 +106.00 1.00 4.00 2.00 1.00 3.00 36.00 44.00 37.00 42.00 41.00 +130.00 1.00 4.00 3.00 1.00 1.00 43.00 54.00 55.00 55.00 46.00 + 93.00 1.00 4.00 3.00 1.00 2.00 73.00 67.00 62.00 58.00 66.00 +163.00 1.00 4.00 1.00 1.00 2.00 52.00 57.00 64.00 58.00 56.00 + 37.00 1.00 3.00 1.00 1.00 3.00 41.00 47.00 40.00 39.00 51.00 + 35.00 1.00 1.00 1.00 2.00 1.00 60.00 54.00 50.00 50.00 51.00 + 87.00 1.00 4.00 2.00 1.00 1.00 50.00 52.00 46.00 50.00 56.00 + 73.00 1.00 4.00 2.00 1.00 2.00 50.00 52.00 53.00 39.00 56.00 +151.00 1.00 4.00 2.00 1.00 3.00 47.00 46.00 52.00 48.00 46.00 + 44.00 1.00 3.00 1.00 1.00 3.00 47.00 62.00 45.00 34.00 46.00 +152.00 1.00 4.00 3.00 1.00 2.00 55.00 57.00 56.00 58.00 61.00 +105.00 1.00 4.00 2.00 1.00 2.00 50.00 41.00 45.00 44.00 56.00 + 28.00 1.00 2.00 2.00 1.00 1.00 39.00 53.00 54.00 50.00 41.00 + 91.00 1.00 4.00 3.00 1.00 3.00 50.00 49.00 56.00 47.00 46.00 + 45.00 1.00 3.00 1.00 1.00 3.00 34.00 35.00 41.00 29.00 26.00 +116.00 1.00 4.00 2.00 1.00 2.00 57.00 59.00 54.00 50.00 56.00 + 33.00 1.00 2.00 1.00 1.00 2.00 57.00 65.00 72.00 54.00 56.00 + 66.00 1.00 4.00 2.00 1.00 3.00 68.00 62.00 56.00 50.00 51.00 + 72.00 1.00 4.00 2.00 1.00 3.00 42.00 54.00 47.00 47.00 46.00 + 77.00 1.00 4.00 1.00 1.00 2.00 61.00 59.00 49.00 44.00 66.00 + 61.00 1.00 4.00 3.00 1.00 2.00 76.00 63.00 60.00 67.00 66.00 +190.00 1.00 4.00 2.00 2.00 2.00 47.00 59.00 54.00 58.00 46.00 + 42.00 1.00 3.00 2.00 1.00 3.00 46.00 52.00 55.00 44.00 56.00 + 2.00 1.00 1.00 2.00 1.00 3.00 39.00 41.00 33.00 42.00 41.00 + 55.00 1.00 3.00 2.00 2.00 2.00 52.00 49.00 49.00 44.00 61.00 + 19.00 1.00 1.00 1.00 1.00 1.00 28.00 46.00 43.00 44.00 51.00 + 90.00 1.00 4.00 3.00 1.00 2.00 42.00 54.00 50.00 50.00 52.00 +142.00 1.00 4.00 2.00 1.00 3.00 47.00 42.00 52.00 39.00 51.00 + 17.00 1.00 1.00 2.00 1.00 2.00 47.00 57.00 48.00 44.00 41.00 +122.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 58.00 53.00 66.00 +191.00 1.00 4.00 3.00 2.00 2.00 47.00 52.00 43.00 48.00 61.00 + 83.00 1.00 4.00 2.00 1.00 3.00 50.00 62.00 41.00 55.00 31.00 +182.00 1.00 4.00 2.00 2.00 2.00 44.00 52.00 43.00 44.00 51.00 + 6.00 1.00 1.00 1.00 1.00 2.00 47.00 41.00 46.00 40.00 41.00 + 46.00 1.00 3.00 1.00 1.00 2.00 45.00 55.00 44.00 34.00 41.00 + 43.00 1.00 3.00 1.00 1.00 2.00 47.00 37.00 43.00 42.00 46.00 + 96.00 1.00 4.00 3.00 1.00 2.00 65.00 54.00 61.00 58.00 56.00 +138.00 1.00 4.00 2.00 1.00 3.00 43.00 57.00 40.00 50.00 51.00 + 10.00 1.00 1.00 2.00 1.00 1.00 47.00 54.00 49.00 53.00 61.00 + 71.00 1.00 4.00 2.00 1.00 1.00 57.00 62.00 56.00 58.00 66.00 +139.00 1.00 4.00 2.00 1.00 2.00 68.00 59.00 61.00 55.00 71.00 +110.00 1.00 4.00 2.00 1.00 3.00 52.00 55.00 50.00 54.00 61.00 +148.00 1.00 4.00 2.00 1.00 3.00 42.00 57.00 51.00 47.00 61.00 +109.00 1.00 4.00 2.00 1.00 1.00 42.00 39.00 42.00 42.00 41.00 + 39.00 1.00 3.00 3.00 1.00 2.00 66.00 67.00 67.00 61.00 66.00 +147.00 1.00 4.00 1.00 1.00 2.00 47.00 62.00 53.00 53.00 61.00 + 74.00 1.00 4.00 2.00 1.00 2.00 57.00 50.00 50.00 51.00 58.00 +198.00 1.00 4.00 3.00 2.00 2.00 47.00 61.00 51.00 63.00 31.00 +161.00 1.00 4.00 1.00 1.00 2.00 57.00 62.00 72.00 61.00 61.00 +112.00 1.00 4.00 2.00 1.00 2.00 52.00 59.00 48.00 55.00 61.00 + 69.00 1.00 4.00 1.00 1.00 3.00 44.00 44.00 40.00 40.00 31.00 +156.00 1.00 4.00 2.00 1.00 2.00 50.00 59.00 53.00 61.00 61.00 +111.00 1.00 4.00 1.00 1.00 1.00 39.00 54.00 39.00 47.00 36.00 +186.00 1.00 4.00 2.00 2.00 2.00 57.00 62.00 63.00 55.00 41.00 + 98.00 1.00 4.00 1.00 1.00 3.00 57.00 60.00 51.00 53.00 37.00 +119.00 1.00 4.00 1.00 1.00 1.00 42.00 57.00 45.00 50.00 43.00 + 13.00 1.00 1.00 2.00 1.00 3.00 47.00 46.00 39.00 47.00 61.00 + 51.00 1.00 3.00 3.00 1.00 1.00 42.00 36.00 42.00 31.00 39.00 + 26.00 1.00 2.00 3.00 1.00 2.00 60.00 59.00 62.00 61.00 51.00 + 36.00 1.00 3.00 1.00 1.00 1.00 44.00 49.00 44.00 35.00 51.00 +135.00 1.00 4.00 1.00 1.00 2.00 63.00 60.00 65.00 54.00 66.00 + 59.00 1.00 4.00 2.00 1.00 2.00 65.00 67.00 63.00 55.00 71.00 + 78.00 1.00 4.00 2.00 1.00 2.00 39.00 54.00 54.00 53.00 41.00 + 64.00 1.00 4.00 3.00 1.00 3.00 50.00 52.00 45.00 58.00 36.00 + 63.00 1.00 4.00 1.00 1.00 1.00 52.00 65.00 60.00 56.00 51.00 + 79.00 1.00 4.00 2.00 1.00 2.00 60.00 62.00 49.00 50.00 51.00 +193.00 1.00 4.00 2.00 2.00 2.00 44.00 49.00 48.00 39.00 51.00 + 92.00 1.00 4.00 3.00 1.00 1.00 52.00 67.00 57.00 63.00 61.00 +160.00 1.00 4.00 2.00 1.00 2.00 55.00 65.00 55.00 50.00 61.00 + 32.00 1.00 2.00 3.00 1.00 3.00 50.00 67.00 66.00 66.00 56.00 + 23.00 1.00 2.00 1.00 1.00 2.00 65.00 65.00 64.00 58.00 71.00 +158.00 1.00 4.00 2.00 1.00 1.00 52.00 54.00 55.00 53.00 51.00 + 25.00 1.00 2.00 2.00 1.00 1.00 47.00 44.00 42.00 42.00 36.00 +188.00 1.00 4.00 3.00 2.00 2.00 63.00 62.00 56.00 55.00 61.00 + 52.00 1.00 3.00 1.00 1.00 2.00 50.00 46.00 53.00 53.00 66.00 +124.00 1.00 4.00 1.00 1.00 3.00 42.00 54.00 41.00 42.00 41.00 +175.00 1.00 4.00 3.00 2.00 1.00 36.00 57.00 42.00 50.00 41.00 +184.00 1.00 4.00 2.00 2.00 3.00 50.00 52.00 53.00 55.00 56.00 + 30.00 1.00 2.00 3.00 1.00 2.00 41.00 59.00 42.00 34.00 51.00 +179.00 1.00 4.00 2.00 2.00 2.00 47.00 65.00 60.00 50.00 56.00 + 31.00 1.00 2.00 2.00 2.00 1.00 55.00 59.00 52.00 42.00 56.00 +145.00 1.00 4.00 2.00 1.00 3.00 42.00 46.00 38.00 36.00 46.00 +187.00 1.00 4.00 2.00 2.00 1.00 57.00 41.00 57.00 55.00 52.00 +118.00 1.00 4.00 2.00 1.00 1.00 55.00 62.00 58.00 58.00 61.00 +137.00 1.00 4.00 3.00 1.00 2.00 63.00 65.00 65.00 53.00 61.00 +end data. + +factor + /variables read write math science socst + /extraction pc + /plot eigen + /criteria mineigen (.557) + . +]) + +AT_CHECK([pspp -O format=csv factor2.sps], [0], + [Table: Communalities +,Initial,Extraction +read,1.000,.736 +write,1.000,.704 +math,1.000,.750 +science,1.000,.849 +socst,1.000,.900 + +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,.557,11.148,78.764,.557,11.148,78.764,,, +3,.407,8.136,86.900,,,,,, +4,.356,7.123,94.023,,,,,, +5,.299,5.977,100.000,,,,,, + +Table: Component Matrix +,Component, +,1,2 +read,.858,.020 +write,.824,-.155 +math,.844,.195 +science,.801,.456 +socst,.783,-.536 +]) + +AT_CLEANUP \ No newline at end of file diff --git a/tests/testsuite.at b/tests/testsuite.at index 1b4d7e44..8b328f47 100644 --- a/tests/testsuite.at +++ b/tests/testsuite.at @@ -11,6 +11,7 @@ m4_include([tests/language/stats/aggregate.at]) m4_include([tests/language/stats/autorecode.at]) m4_include([tests/language/stats/crosstabs.at]) m4_include([tests/language/stats/descriptives.at]) +m4_include([tests/language/stats/factor.at]) m4_include([tests/language/stats/frequencies.at]) m4_include([tests/language/xforms/compute.at]) m4_include([tests/language/xforms/recode.at])