Remove unneeded #includes.
[pspp] / tests / language / stats / regression.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
17 AT_BANNER([LINEAR REGRESSION])
18
19 AT_SETUP([LINEAR REGRESSION - basic])
20 AT_DATA([regression.sps], [dnl
21 set format = F22.3.
22 data list notable list / v0 to v2.
23 filter by v0.
24 begin data
25  0.65377128  7.735648 -23.97588
26 -0.13087553  6.142625 -19.63854
27  0.34880368  7.651430 -25.26557
28  0.69249021  6.125125 -16.57090
29 -0.07368178  8.245789 -25.80001
30 -0.34404919  6.031540 -17.56743
31  0.75981559  9.832291 -28.35977
32 -0.46958313  5.343832 -16.79548
33 -0.06108490  8.838262 -29.25689
34  0.56154863  6.200189 -18.58219
35 end data
36 regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid.
37 list.
38 ])
39
40 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
41 "regression.sps:16.82-16.96: warning: REGRESSION: REGRESSION with SAVE ignores FILTER.  All cases will be processed.
42    16 | regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred resid.
43       |                                                                                  ^~~~~~~~~~~~~~~"
44
45 Table: Model Summary (v2)
46 R,R Square,Adjusted R Square,Std. Error of the Estimate
47 .971,.942,.925,1.337
48
49 Table: ANOVA (v2)
50 ,Sum of Squares,df,Mean Square,F,Sig.
51 Regression,202.753,2,101.376,56.754,.000
52 Residual,12.504,7,1.786,,
53 Total,215.256,9,,,
54
55 Table: Coefficients (v2)
56 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
57 ,B,Std. Error,Beta,,
58 (Constant),2.191,2.357,.000,.930,.380
59 v0,1.813,1.053,.171,1.722,.129
60 v1,-3.427,.332,-1.026,-10.334,.000
61
62 Table: Data List
63 v0,v1,v2,RES1,PRED1
64 .654,7.736,-23.976,-.84,-23.13
65 -.131,6.143,-19.639,-.54,-19.10
66 .349,7.651,-25.266,-1.87,-23.40
67 .692,6.125,-16.571,.97,-17.54
68 -.074,8.246,-25.800,.40,-26.20
69 -.344,6.032,-17.567,1.53,-19.10
70 .760,9.832,-28.360,1.77,-30.13
71 -.470,5.344,-16.795,.18,-16.97
72 -.061,8.838,-29.257,-1.05,-28.21
73 .562,6.200,-18.582,-.54,-18.04
74 ])
75 AT_CLEANUP
76
77
78 AT_SETUP([LINEAR REGRESSION - one save])
79 AT_DATA([regression.sps], [dnl
80 set format = F22.3.
81 data list notable list / v0 to v2.
82 begin data
83  0.65377128  7.735648 -23.97588
84 -0.13087553  6.142625 -19.63854
85  0.34880368  7.651430 -25.26557
86  0.69249021  6.125125 -16.57090
87 -0.07368178  8.245789 -25.80001
88 -0.34404919  6.031540 -17.56743
89  0.75981559  9.832291 -28.35977
90 -0.46958313  5.343832 -16.79548
91 -0.06108490  8.838262 -29.25689
92  0.56154863  6.200189 -18.58219
93 end data
94 regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=resid.
95 regression /variables=v0 v1 v2 /statistics defaults /dependent=v2 /method=enter /save=pred.
96 list.
97 ])
98
99 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
100 Table: Model Summary (v2)
101 R,R Square,Adjusted R Square,Std. Error of the Estimate
102 .971,.942,.925,1.337
103
104 Table: ANOVA (v2)
105 ,Sum of Squares,df,Mean Square,F,Sig.
106 Regression,202.753,2,101.376,56.754,.000
107 Residual,12.504,7,1.786,,
108 Total,215.256,9,,,
109
110 Table: Coefficients (v2)
111 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
112 ,B,Std. Error,Beta,,
113 (Constant),2.191,2.357,.000,.930,.380
114 v0,1.813,1.053,.171,1.722,.129
115 v1,-3.427,.332,-1.026,-10.334,.000
116
117 Table: Model Summary (v2)
118 R,R Square,Adjusted R Square,Std. Error of the Estimate
119 .971,.942,.925,1.337
120
121 Table: ANOVA (v2)
122 ,Sum of Squares,df,Mean Square,F,Sig.
123 Regression,202.753,2,101.376,56.754,.000
124 Residual,12.504,7,1.786,,
125 Total,215.256,9,,,
126
127 Table: Coefficients (v2)
128 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
129 ,B,Std. Error,Beta,,
130 (Constant),2.191,2.357,.000,.930,.380
131 v0,1.813,1.053,.171,1.722,.129
132 v1,-3.427,.332,-1.026,-10.334,.000
133
134 Table: Data List
135 v0,v1,v2,RES1,PRED1
136 .654,7.736,-23.976,-.84,-23.13
137 -.131,6.143,-19.639,-.54,-19.10
138 .349,7.651,-25.266,-1.87,-23.40
139 .692,6.125,-16.571,.97,-17.54
140 -.074,8.246,-25.800,.40,-26.20
141 -.344,6.032,-17.567,1.53,-19.10
142 .760,9.832,-28.360,1.77,-30.13
143 -.470,5.344,-16.795,.18,-16.97
144 -.061,8.838,-29.257,-1.05,-28.21
145 .562,6.200,-18.582,-.54,-18.04
146 ])
147 AT_CLEANUP
148
149
150 # Test to ensure that the /SAVE subcommand works properly when SPLIT is active
151 AT_SETUP([LINEAR REGRESSION - SAVE vs SPLITS])
152
153 # Generate some test data based on a linear model
154 AT_DATA([gen-data.sps], [dnl
155 set seed = 1.
156 input program.
157 loop #c = 1 to 20.
158      compute x0 = rv.normal (0,1).
159      compute x1 = rv.normal (0,2).
160      compute err = rv.normal (0,0.1).
161      compute y = 4 - 2 * x0 + 3 * x1 + err.
162      compute g = (#c > 10).
163      end case.
164 end loop.
165 end file.
166 end input program.
167
168 print outfile='regdata.txt' /g x0 x1 y err *.
169 execute.
170 ])
171
172 AT_CHECK([pspp -O format=csv gen-data.sps], [0], [ignore])
173
174 # Use our test data to create a predictor and a residual variable
175 # for G == 0
176 AT_DATA([regression0.sps], [dnl
177 data list notable file='regdata.txt' list /g x0 x1 y err *.
178
179 select if (g = 0).
180
181 regression
182            /variables = x0 x1
183            /dependent = y
184            /statistics = all
185            /save = pred resid.
186            .
187
188 print outfile='outdata-g0.txt' /g x0 x1 y err res1 pred1 *.
189 execute.
190 ])
191
192
193 AT_CHECK([pspp -O format=csv regression0.sps], [0], [ignore])
194
195 # Use our test data to create a predictor and a residual variable
196 # for G == 1
197 AT_DATA([regression1.sps], [dnl
198 data list notable file='regdata.txt' list /g x0 x1 y err *.
199
200 select if (g = 1).
201
202 regression
203            /variables = x0 x1
204            /dependent = y
205            /statistics = all
206            /save = pred resid.
207            .
208
209 print outfile='outdata-g1.txt' /g x0 x1 y err res1 pred1 *.
210 execute.
211 ])
212
213
214 AT_CHECK([pspp -O format=csv regression1.sps], [0], [ignore])
215
216 # Use our test data to create a predictor and a residual variable
217 # The data is split on G
218 AT_DATA([regression-split.sps], [dnl
219 data list notable file='regdata.txt' list /g x0 x1 y err *.
220
221 split file by g.
222
223 regression
224            /variables = x0 x1
225            /dependent = y
226            /statistics = all
227            /save = pred resid.
228            .
229
230 print outfile='outdata-split.txt' /g x0 x1 y err res1 pred1 *.
231 execute.
232 ])
233
234 AT_CHECK([pspp -O format=csv regression-split.sps], [0], [ignore])
235
236 # The concatenation of G==0 and G==1 should be identical to the SPLIT data
237 AT_CHECK([cat outdata-g0.txt outdata-g1.txt | diff outdata-split.txt - ], [0], [])
238
239 AT_CLEANUP
240
241
242 # Test that the procedure behaves sensibly when presented with
243 # multiple dependent variables
244 AT_SETUP([LINEAR REGRESSION multiple dependent variables])
245 AT_DATA([regression.sps], [dnl
246 set seed = 2.
247 input program.
248 loop #c = 1 to 200.
249      compute x0 = rv.normal (0, 1).
250      compute x1 = rv.normal (0, 2).
251      compute err = rv.normal (0, 0.8).
252      compute y = 2 - 1.5 * x0 + 8.4 * x1 + err.
253      compute ycopy = y.
254      end case.
255 end loop.
256 end file.
257 end input program.
258
259 regression
260            /variables = x0 x1
261            /dependent = y ycopy
262            /statistics = default.
263 ])
264
265 AT_CHECK([pspp -O format=csv regression.sps > output], [0], [ignore])
266
267 AT_CHECK([head -16 output > first], [0], [])
268 AT_CHECK([tail -16 output > second], [0], [])
269
270 AT_CHECK([sed -e 's/ycopy/y/g' second | diff first -], [0], [])
271
272
273 AT_CLEANUP
274
275 # Tests the QR decomposition used by the REGRESSION command.
276 AT_SETUP([LINEAR REGRESSION test of QR decomposition])
277 AT_DATA([regression.sps], [dnl
278 data list list / v0 to v1.
279 begin data
280 -12.84099361 0.873270778
281  16.64932538 0.371315664
282  -1.88061907 0.505503722
283  -6.20952354 0.734698282
284   0.33272576 0.891224610
285  -5.54912717 0.052318165
286   6.11832417 0.448853404
287  11.78124974 0.470447593
288   0.75960353 0.565082303
289   6.06432768 0.149316743
290  -2.64919436 0.752532411
291 -10.32250712 0.798263603
292   2.06355038 0.469129797
293  -9.71851742 0.927162270
294   4.65582553 0.250629262
295   9.54574474 0.847032310
296   7.35544368 0.197028541
297  -2.09609740 0.400584261
298  10.30101161 0.671546480
299  -5.24501039 0.929962876
300   1.73412473 0.758161354
301  -3.12732732 0.569785505
302  12.66261501 0.630640223
303  -2.90956805 0.576067804
304   4.89649177 0.624483995
305  13.64613114 0.591089881
306  14.03198397 0.544587572
307   2.23566810 0.967898139
308   5.37367760 0.916246929
309   9.01346888 0.451702743
310   0.75378683 0.235544137
311  -3.47470624 0.742668194
312  -1.02063266 0.860311687
313  -2.67132813 0.082460702
314  23.67661680 0.932553932
315   7.95061359 0.430161125
316   2.05300558 0.066331375
317  -2.01332644 0.163705417
318  20.00663784 0.587292630
319   3.06099417 0.161411889
320  -3.46115358 0.216684625
321  -6.85287183 0.548714855
322  -4.27923809 0.630997663
323  -0.94863395 0.880612945
324   4.47481747 0.359885215
325 -12.80962955 0.886070341
326   9.35753086 0.187176558
327   2.81002235 0.063035095
328   0.01532424 0.964327101
329   0.29867732 0.866408063
330  -2.89035649 0.812135868
331   4.17352811 0.608884061
332  18.15502183 0.920568258
333  -2.92662792 0.550792959
334  -6.08090449 0.965036595
335  -1.09135397 0.862548019
336   7.02816784 0.042277017
337 -21.20245068 0.430673493
338  -8.83397584 0.724976162
339  -0.89055843 0.017934904
340   7.03871587 0.308829557
341   3.84286316 0.685105924
342   4.50280692 0.447635420
343  11.39207346 0.875177896
344  10.86673874 0.518530912
345   7.09853081 0.588367569
346 -12.82864915 0.184667098
347  13.74888760 0.610891139
348   0.37379146 0.557720134
349  -9.79020267 0.942839981
350   0.71574466 0.564570338
351 -17.56040637 0.182061777
352   2.52620466 0.306875011
353   5.37718673 0.366807049
354  -1.83964300 0.465772898
355   6.04848363 0.644501799
356   4.57402403 0.121419591
357   8.55606848 0.373011464
358  -8.46827907 0.491176571
359  -1.77989798 0.734722847
360  -0.68661121 0.540984182
361   1.55798880 0.822587656
362   5.22810831 0.333747878
363   9.50280477 0.068100934
364  -3.74521465 0.248537644
365   1.36045068 0.851827791
366   4.41604088 0.197207162
367  -3.72568327 0.726916693
368  -5.36123334 0.906513529
369   3.61594583 0.414340595
370 -10.01952852 0.140372658
371  25.48681482 0.354309660
372  -3.34529093 0.090075388
373 -18.00437582 0.461438059
374  -5.29782460 0.004362856
375   2.79608522 0.861294398
376  -1.64076209 0.345775481
377   6.82802334 0.137933862
378  -0.45416818 0.404379208
379  -1.66868582 0.797685201
380 -10.02820292 0.075876582
381   5.68232031 0.404815042
382   8.25113850 0.769173748
383  -2.83544237 0.076583474
384   0.87659945 0.092751009
385   6.60270870 0.530444351
386 -12.63924989 0.362099960
387  -6.24451253 0.641993458
388   3.53339015 0.461991892
389  -0.74012232 0.437409755
390  15.37311996 0.974913038
391  -8.09464797 0.543308711
392  -9.61320222 0.221564578
393   0.21843662 0.856512540
394  -1.56958954 0.610709221
395   6.44977372 0.200382138
396 -13.29136274 0.093222309
397   6.46257214 0.024135196
398  -3.82727990 0.601335801
399   0.43081953 0.268230667
400  19.06654416 0.219972815
401  17.02906651 0.996849502
402 -10.18073139 0.012543080
403  12.72088788 0.910600764
404  10.45328185 0.331285901
405   7.14370922 0.896312020
406  -2.81754334 0.048741266
407   6.40217095 0.075796756
408  -3.18030478 0.666325307
409   8.64585957 0.120549153
410   1.37952764 0.899991932
411 -11.81143886 0.601949630
412   0.03899706 0.363808260
413 -10.63828243 0.031092967
414  -6.66940972 0.246204205
415  -5.07374962 0.951272057
416   4.82281566 0.063928187
417 -21.93693564 0.050972680
418  -4.54569883 0.225839693
419  -0.92422779 0.437796785
420  -1.11683029 0.740215139
421  16.77765554 0.851072372
422   9.73614597 0.388180586
423  14.05345168 0.063760129
424   1.20512012 0.665964184
425   8.00307080 0.102447114
426   8.01252623 0.580929209
427 -13.54924183 0.438420739
428   9.87164361 0.970859344
429  17.63437095 0.250501797
430  -3.42503574 0.873290220
431  -2.45873197 0.847756049
432  17.29212092 0.411683187
433   1.15496098 0.530658504
434  -2.14438907 0.592255367
435  -1.79942021 0.517773009
436  -1.30677990 0.830860762
437   1.70233874 0.291826660
438  -3.05532536 0.801767829
439  -4.06732625 0.092294501
440   6.34665476 0.270426235
441   9.46946411 0.196915311
442  14.50919907 0.480357167
443   8.93767237 0.778228613
444   1.90298854 0.903146151
445  18.50500507 0.598561307
446   4.45123027 0.555898218
447  11.37344114 0.616557707
448 -12.14693218 0.409187285
449  18.27198688 0.141619222
450  -5.75939569 0.056989619
451  -4.05515382 0.369281201
452  16.69882098 0.946885257
453   6.39050536 0.679704228
454   4.04213339 0.662792380
455   6.89608366 0.419877433
456   1.56496633 0.358227958
457   5.16679947 0.095144366
458  -3.06280456 0.883265975
459   2.76279175 0.866571973
460   1.84969249 0.264869828
461  21.79840498 0.702650979
462   1.42450528 0.719308635
463   0.96797046 0.111937435
464  18.26840323 0.075621738
465  13.38288377 0.573399086
466   2.41101500 0.766238677
467   3.83866337 0.499888953
468  -1.56577367 0.695244089
469  -0.90342790 0.671654151
470  10.83775583 0.026041124
471  -9.89767935 0.745297991
472  11.74840150 0.309144074
473   1.73069359 0.814063985
474  -5.27966183 0.591005828
475   3.33030043 0.559401806
476   1.31427975 0.520950237
477 -10.04588558 0.507008362
478  10.41228345 0.425867272
479   1.71961097 0.595783108
480 -17.54904427 0.328788939
481  -2.23545419 0.223377350
482  -8.68774333 0.980964240
483  -3.48048220 0.008877675
484  -3.69635326 0.090236718
485   9.76114237 0.769375983
486 -10.25662038 0.508137553
487   0.11155446 0.468504431
488  -8.06824580 0.414098962
489   3.10031660 0.327130207
490  -3.33393146 0.756896774
491  -3.96276749 0.530956360
492  14.53610268 0.846474699
493   1.70505918 0.754662464
494  -1.93495001 0.656650411
495   5.01974522 0.745337633
496  13.41249973 0.489362476
497  11.49288744 0.335924476
498  12.59019763 0.155560469
499 -10.17947298 0.677318449
500   0.05556115 0.655090105
501   3.82092860 0.051838719
502   8.23041456 0.918272190
503  -0.50314649 0.772015826
504  20.05162157 0.880265258
505   8.98816884 0.666646668
506  -6.28312120 0.138534416
507   3.68589909 0.274559458
508   0.59699510 0.253180863
509  -2.74783135 0.983525221
510   0.32515065 0.839969577
511  -3.60606166 0.330646732
512  -0.82037740 0.129591173
513   6.12444860 0.098536516
514  10.95671074 0.033546728
515  -2.84911174 0.720288722
516   6.04597572 0.577061422
517  -0.60147150 0.674096868
518  -5.30458364 0.291468008
519   2.68044943 0.379853840
520   0.85986585 0.984214339
521 -12.77906359 0.882390290
522   7.21420144 0.550884826
523   2.31817022 0.231021556
524  11.60161950 0.888496654
525  -0.19346228 0.242609713
526   5.07478120 0.759161318
527  14.54155003 0.040387654
528   3.81039636 0.874572741
529   2.23233049 0.448317248
530   0.19481869 0.201906051
531   2.81530451 0.132131690
532  12.39893259 0.674693704
533   0.47054642 0.632959494
534   2.16152913 0.734480632
535   0.33398836 0.315024718
536   7.35509037 0.304570986
537  -2.92336559 0.539062343
538   5.79622573 0.392393310
539  -2.37607425 0.403380474
540   0.04498550 0.756875541
541  -1.63674414 0.613789514
542  11.80310547 0.832651469
543   6.30630243 0.850689403
544   1.48394652 0.096243229
545   4.03361865 0.799660045
546   3.54707273 0.408520520
547   2.00327040 0.702944912
548  17.30761707 0.380542812
549   5.72738968 0.105447516
550 -13.64604891 0.328506659
551   8.35976334 0.702173924
552  -7.41197443 0.134396488
553 -15.95683040 0.618526462
554   8.76889573 0.950243069
555  -1.13482624 0.113477080
556  -0.60311407 0.090444247
557   4.95508365 0.612511543
558   5.36934491 0.979213258
559  -0.03554882 0.807185690
560 -11.58131144 0.183341373
561   4.46809041 0.796330582
562  12.49741067 0.346860912
563   8.63824488 0.073684997
564   0.49990913 0.732519306
565  12.82688360 0.109400213
566  13.20375065 0.850369092
567  -8.41110869 0.177717087
568  16.31959963 0.727704840
569  17.59203613 0.235311681
570   0.32148420 0.842195936
571   5.43148331 0.670904647
572   7.14649727 0.028190029
573   0.25410683 0.421535783
574 -12.41047826 0.086404379
575 -10.64180909 0.229659236
576  -6.40185653 0.876365242
577  15.63063324 0.667672536
578   1.94280423 0.799266628
579  -5.76507450 0.367344192
580   8.60895533 0.154109357
581   9.38306751 0.788742770
582   3.43573528 0.284535277
583   4.81848966 0.872283177
584  11.65839314 0.234109111
585  -5.57884822 0.030363060
586  -3.94238060 0.325320686
587   9.38133340 0.201141788
588  -7.65003459 0.647734396
589  11.23091019 0.084927159
590  -6.07705432 0.037273791
591   7.46380750 0.506897136
592   7.42034855 0.869351148
593  -4.43031973 0.231191152
594  -1.07351537 0.480234836
595  -1.40653281 0.690620421
596  -3.82710168 0.990191328
597   5.04583490 0.543427375
598 -11.54265099 0.270542185
599   0.49059479 0.991447248
600  -1.40871469 0.555998766
601   3.64241437 0.743840673
602 -18.30031589 0.357478210
603   4.27487959 0.770619738
604   1.28805821 0.654787106
605  -3.19542768 0.218110139
606  12.53375654 0.011857644
607  11.78889419 0.054127726
608  -5.38392310 0.839309080
609  16.38024181 0.228801038
610  -0.59622631 0.134381782
611  -0.74107258 0.258146632
612 -12.31429450 0.020524447
613  -0.79785028 0.968028764
614   6.39899711 0.038162566
615   7.42024044 0.716163692
616  -3.62470664 0.018201813
617  -2.55049724 0.162446610
618 -10.79888854 0.683070478
619  10.18490144 0.546461234
620  -2.76979044 0.198830067
621   4.85164813 0.094100357
622   0.96477200 0.381801756
623   8.13344336 0.639730450
624   9.04684412 0.786084368
625  10.41746272 0.828304181
626   0.94334368 0.798419831
627  10.13116556 0.191715972
628  -4.12728628 0.575178239
629  -9.59222379 0.876405375
630   1.64680258 0.391003085
631  -4.58897613 0.039176486
632   0.38394379 0.511577564
633  -4.80428215 0.222785463
634   0.35363661 0.681658725
635  -9.63685708 0.183035382
636   3.54363414 0.766127414
637   6.89610808 0.967514568
638  -2.03781105 0.464416752
639   8.67956196 0.421424078
640  -1.09959038 0.061231448
641   7.12587456 0.028601318
642  -6.93064672 0.402561175
643   8.57989199 0.925089270
644  -9.55071810 0.454993099
645  -8.11914736 0.509644286
646  -5.41909698 0.077813151
647 -17.03336572 0.875713545
648  -1.27438609 0.602163625
649   3.09834374 0.105599007
650  -1.59865741 0.439939102
651  11.82272089 0.754984309
652   4.30969696 0.483834579
653 -10.76886192 0.222486992
654   7.05419803 0.903020271
655   7.36096847 0.440357053
656  -2.05864869 0.581170147
657  -9.08366913 0.318677911
658   8.57119930 0.605668919
659   7.87702340 0.570206991
660   5.22035786 0.542344385
661   2.37238850 0.595969470
662  -4.29809941 0.634313781
663   4.51647479 0.796663089
664  -0.62478780 0.562099444
665   8.50866078 0.490014249
666   3.46694991 0.122890089
667  -7.31956453 0.885170890
668   2.20259268 0.167180856
669  -1.81003626 0.702563515
670   8.44526939 0.973495019
671   8.19767069 0.881261264
672  -5.92422578 0.686557351
673  -0.11826129 0.712798344
674   5.66132869 0.922826429
675  -5.40845018 0.642183516
676   6.67839036 0.680978989
677  11.88962825 0.487904896
678   3.32266332 0.931709581
679   0.24234019 0.405641313
680 -12.79023339 0.361005489
681 -13.57875491 0.266289733
682   1.81304596 0.775093821
683   0.36755600 0.400225605
684  -9.15574205 0.518040748
685  -3.90436548 0.396869908
686   9.24764042 0.669374848
687   0.74869385 0.609881390
688  -3.62958907 0.928867495
689  -0.02527232 0.557679930
690   0.04433418 0.152565816
691  11.76152632 0.865663501
692  -4.62181124 0.007000650
693   5.82271403 0.389678502
694   0.33289002 0.532940826
695  -7.65647076 0.681574524
696  11.81023732 0.107165912
697  11.42121999 0.989580324
698  -5.47120641 0.762285550
699   3.82311561 0.388755074
700  16.91059711 0.461236022
701   4.14012105 0.802420151
702  -1.35278659 0.036646959
703 -12.81733350 0.179096148
704  -0.94395134 0.450959878
705  -5.39002376 0.264783062
706   4.16227017 0.780743762
707   7.26179625 0.821382454
708  15.10062276 0.469253936
709   1.45877225 0.685434405
710  -9.87966760 0.767201511
711   7.03156071 0.195142483
712 -11.71327419 0.774014869
713  -4.55518706 0.973103604
714  -1.75221406 0.175172193
715  10.35631400 0.080670414
716   4.97650495 0.597478189
717   2.25703939 0.585949751
718  10.72500409 0.339720931
719  -5.02901029 0.997874377
720   6.24398637 0.655067479
721  -5.83880059 0.184948259
722   2.17256077 0.746741866
723  -5.59809380 0.277523381
724   8.19384177 0.334565607
725   3.35250431 0.952057263
726  16.20874892 0.901400446
727   1.63205839 0.235388475
728  -1.07921163 0.608376332
729   0.24315118 0.862639830
730  15.61923078 0.050955422
731   1.99639207 0.358905687
732   8.14825538 0.190069662
733   4.55210835 0.784025901
734  13.51582298 0.973572910
735  15.42415796 0.969080992
736   2.23978124 0.551857514
737   1.00858991 0.919566804
738  -2.77293574 0.906998180
739   7.10750420 0.934792213
740  -8.01377290 0.682306063
741   9.67873875 0.239576806
742   7.54867950 0.065860266
743  13.85701962 0.733823443
744   8.48212853 0.285731085
745   3.55278843 0.998255904
746  21.94592206 0.205463912
747  -2.07957143 0.948665109
748   1.54169997 0.200109744
749 -11.36934275 0.447122472
750   3.07094572 0.815147945
751   6.45818709 0.007849948
752   1.85594578 0.818796540
753  -2.43799564 0.962013689
754 -17.96539549 0.654190963
755  -0.93433746 0.454930236
756 -11.06904368 0.898560975
757  14.89733742 0.479152492
758  -5.72390675 0.136197255
759   9.46781102 0.669006610
760   5.35954546 0.259381138
761   3.78388994 0.933778797
762   1.95373423 0.517555994
763  10.96772341 0.666138826
764   9.40585102 0.779906833
765   0.75347502 0.142656741
766   7.64803672 0.734297119
767  -0.40051164 0.362230232
768  10.00747057 0.660820381
769 -12.86024975 0.072988046
770   1.43515528 0.229672223
771  -6.75981709 0.658534537
772  -5.61355474 0.795897133
773  -4.40596595 0.038787666
774  -1.37033650 0.371835229
775   6.66666573 0.560963737
776   8.18430044 0.284787698
777  -0.55742330 0.622783662
778  -0.39757686 0.673551753
779 -12.68628005 0.373038561
780   4.06416215 0.760546238
781   4.65859855 0.516761886
782   3.55304076 0.266856843
783  -7.35294817 0.615783196
784   1.01222898 0.158266779
785   9.91052610 0.285619547
786  -6.42966726 0.573689954
787  10.97425098 0.985095061
788   5.79394599 0.404333309
789  10.09106608 0.441037857
790  -1.47295537 0.577661077
791  -2.07959719 0.547176133
792  -8.76910940 0.498979558
793 -11.15658312 0.135862745
794  -0.88456783 0.326480064
795   9.71607440 0.998076370
796  -8.76072622 0.386244511
797 -19.26823092 0.461833959
798  -0.11280313 0.064155908
799   0.64625887 0.172078148
800  -5.35323428 0.331153163
801  -1.71034509 0.330955888
802   4.27104744 0.590544244
803   7.33843789 0.263171531
804  -5.38121637 0.539675802
805  -6.87566548 0.127313096
806  -2.50161298 0.269417630
807  10.99076986 0.097362729
808   6.34017269 0.318528587
809  -4.63672382 0.451038055
810 -11.55122495 0.987073278
811   4.78618612 0.297342215
812   2.97547390 0.197312152
813  -5.54495280 0.499701114
814  17.67606173 0.810316588
815  16.01578815 0.643667608
816  -0.16258467 0.228284761
817   7.92123340 0.784289369
818  -2.26303900 0.270764770
819   5.84136933 0.437763291
820   4.96955217 0.389720490
821  -8.09516710 0.829068548
822  14.59207207 0.513593803
823   2.80954688 0.650799867
824   4.53653552 0.672326278
825   4.49116737 0.807447691
826  18.87549709 0.647303378
827   9.80118464 0.932576117
828 -13.02124969 0.038651904
829  -6.15189291 0.697593318
830  15.81920283 0.249825051
831  10.81503188 0.152372300
832 -23.58738366 0.593560367
833   8.15716338 0.411680007
834   3.45349379 0.351061414
835  -6.39345334 0.374926213
836   8.72924585 0.165759028
837  22.17948804 0.003736780
838  -4.73053410 0.582425257
839  16.88289626 0.484899167
840  -1.78826142 0.663273340
841  -0.78106025 0.337039969
842  -2.92461669 0.810174719
843 -13.89224399 0.177428986
844   4.56809819 0.025010350
845  -1.07452825 0.649632933
846   0.58148751 0.829606422
847  12.13329525 0.354819526
848  17.35605568 0.284862590
849 -12.43678107 0.827661083
850  -1.89492796 0.574929572
851   2.18520382 0.846299917
852  18.11449649 0.603173531
853   4.34508582 0.484049042
854  17.49394569 0.094811656
855  10.67752350 0.166176400
856  17.13374502 0.547208197
857   4.42138123 0.768691494
858   5.38445574 0.788597361
859   0.79946671 0.851883720
860  -4.67547904 0.995621191
861  -5.61496422 0.523793593
862 -20.52093126 0.881207308
863  -8.95996814 0.851078124
864  -7.63483710 0.739657373
865  11.02131097 0.678060014
866 -10.56228517 0.202393048
867   6.48841788 0.143946271
868   3.44853632 0.913249620
869  -0.02080024 0.070765134
870   2.08654297 0.032468089
871   8.13415912 0.439470874
872  11.19028936 0.944954026
873   0.26670866 0.492724593
874  -9.33692734 0.982611921
875  17.23967092 0.313428994
876   0.36906670 0.660669528
877   7.89735684 0.977628886
878  -4.00171487 0.379327632
879   5.01615432 0.735627296
880   0.42214214 0.092461754
881  13.60634772 0.218359635
882   6.57431413 0.067653525
883  -1.77668341 0.717799276
884   5.16227422 0.325502093
885 -15.29091550 0.332815338
886   3.33602480 0.594168551
887  13.80131443 0.817724470
888   5.92111679 0.947854666
889   3.59747624 0.330860216
890  -6.79722403 0.093518715
891  -1.86606213 0.824179728
892  17.05226458 0.466573672
893  10.39712467 0.409067778
894  -4.78536386 0.891470739
895  11.92963128 0.719633060
896  -1.44230992 0.232628002
897 -12.31860616 0.834134222
898   2.93439660 0.957842480
899  14.27963295 0.546264646
900   2.17488820 0.701170328
901  10.78772417 0.612332448
902  -0.47049341 0.378564293
903  -0.35140634 0.034337429
904   5.04887868 0.211697132
905  -3.51562580 0.663243607
906  -0.82013387 0.602497174
907   2.78954743 0.325294790
908   8.67905777 0.820296625
909 -12.70343389 0.315467361
910  -2.59373236 0.015571904
911  -4.60369241 0.293737716
912   1.58669084 0.671091860
913 -10.44245103 0.501340276
914   4.85215578 0.141572007
915  10.46303284 0.801814632
916   1.27898298 0.236929983
917  -1.72225479 0.608500539
918  20.18685735 0.827124630
919   3.27308817 0.542065179
920   1.01596956 0.254672115
921  -8.88872881 0.460876757
922 -11.31397349 0.636168639
923   0.85294367 0.816417328
924   3.54262337 0.944147626
925 -10.53603202 0.675775741
926   4.34832198 0.121988381
927  11.56451662 0.283063133
928  -7.36454369 0.500596540
929  -8.23701113 0.379483261
930  -8.36081323 0.219730782
931  -6.39158860 0.739171315
932  -1.40518544 0.478709398
933  -4.01314821 0.460476388
934  -7.34814047 0.406242873
935  -7.80836711 0.730648091
936  -0.57729135 0.152336258
937   4.98352832 0.026424939
938  -3.78181635 0.453598432
939  20.16821827 0.845273124
940   5.20758271 0.573569671
941  -3.05534245 0.286828574
942  -5.31306254 0.961990401
943   1.09307567 0.006478724
944  -3.75412572 0.598277695
945  -2.38444245 0.777900122
946   2.46837742 0.280363751
947   9.72195519 0.041094463
948   3.96271247 0.604775284
949   2.14105354 0.400315328
950   7.88645912 0.404573389
951  -4.03565076 0.798377309
952  10.80180959 0.932152434
953 -10.89359212 0.446813857
954   1.43144578 0.310194540
955   4.79825196 0.504826858
956  10.73201365 0.384306369
957  -4.07526187 0.893893643
958  -2.84330198 0.390202663
959   5.81825057 0.830581384
960  -2.77842745 0.382966910
961  -7.70333673 0.157692966
962  -3.25753058 0.726303603
963   8.50032387 0.556524444
964   2.35027236 0.857076526
965  -1.70740565 0.194760923
966  -3.40693880 0.696420946
967  -8.03983352 0.514393263
968  -1.85105344 0.609459979
969  -9.01148029 0.526019631
970  18.37344635 0.690793045
971  16.46079416 0.811535334
972   4.10224315 0.043403618
973   7.06657672 0.831274577
974  15.31421824 0.434558881
975 -12.36760970 0.004215634
976   1.95473415 0.277788662
977  -0.93207006 0.368433415
978  15.39919341 0.843189783
979   5.23452387 0.626226925
980  11.40805770 0.002417288
981  -1.30282837 0.072493756
982   3.92130690 0.675355182
983   2.53148399 0.027222295
984   4.92705318 0.934429364
985   5.54978818 0.042268708
986  -2.19608977 0.246743834
987  -0.62565550 0.858214200
988  -8.98329365 0.646827226
989  12.78468146 0.533966352
990   2.01061290 0.418710227
991   1.03689579 0.019241741
992   8.01166696 0.992268130
993  -4.49786437 0.694127903
994  -8.15387184 0.066275002
995   2.22256207 0.083301613
996 -12.27145086 0.535369809
997   9.95709112 0.227692557
998  14.58198717 0.667298058
999   5.98046083 0.922503625
1000   1.25640725 0.632933575
1001   9.77623752 0.136171032
1002   5.57068426 0.374916651
1003 -10.07048336 0.470411379
1004   3.69267954 0.897278365
1005   2.22185354 0.212539549
1006   7.96155623 0.720525208
1007  -6.21272358 0.771491819
1008   2.63054735 0.474989115
1009  -2.81488890 0.675381020
1010   4.52747191 0.118615879
1011  -3.22975936 0.783991133
1012  11.42834761 0.423344824
1013   0.26512464 0.617515445
1014  -5.84322807 0.210915613
1015   9.61073028 0.988117333
1016  -6.11878012 0.492318959
1017   5.30581443 0.339379499
1018  -6.40132703 0.903540026
1019   1.22921808 0.122161655
1020   8.08547837 0.197296588
1021  -0.77943801 0.935963718
1022  11.43194858 0.828270943
1023  -5.41689395 0.556863468
1024  15.14667847 0.565186375
1025  -5.15327419 0.542802437
1026  -3.95903082 0.643379366
1027   5.78847793 0.391369361
1028  11.54430873 0.158789330
1029   1.90340148 0.841316129
1030  14.69680285 0.532022770
1031   0.68552840 0.367073827
1032  -8.72287967 0.250127491
1033   9.35401445 0.836083158
1034   5.32139524 0.996712598
1035 -14.53387897 0.825434481
1036  -2.93925146 0.513153861
1037  12.54386493 0.713306793
1038   2.04842442 0.993893406
1039   2.87461954 0.049843312
1040   4.89765230 0.376710062
1041  -6.23945314 0.321108142
1042  -3.45840168 0.854710947
1043   9.05807160 0.199992188
1044   3.33815006 0.787302467
1045   4.22244242 0.351841910
1046  15.75879160 0.268699469
1047   2.78549859 0.920299974
1048  -4.46643118 0.727283862
1049   0.48021298 0.428672083
1050   2.55814938 0.130915212
1051   5.00692968 0.062266047
1052   4.78801127 0.325124688
1053   6.39524485 0.693406744
1054 -10.46792584 0.458128441
1055  10.14111908 0.353412759
1056 -10.56424183 0.821588957
1057   7.60967746 0.267669137
1058  -2.34956688 0.434855697
1059  23.82269027 0.802311880
1060   8.37170447 0.445185000
1061  10.05024769 0.778687843
1062  -9.15753018 0.957292819
1063  12.17438228 0.774769426
1064   1.57960028 0.783591989
1065   0.06719501 0.849073924
1066  16.21114558 0.243444943
1067  -3.79808298 0.842994720
1068   8.98927715 0.020537113
1069   7.72362992 0.984168340
1070  11.25158442 0.152385348
1071 -21.23936903 0.909204114
1072   7.34995949 0.987249305
1073  -7.99435203 0.335456401
1074  -2.78218185 0.768517548
1075  11.59547596 0.466617637
1076  15.90870706 0.071892573
1077   5.58160897 0.554485703
1078  16.05253351 0.815206562
1079  -3.23103465 0.280495460
1080  -4.61108636 0.035757819
1081   5.41596511 0.746146856
1082   2.92445613 0.136743821
1083  11.23628254 0.681316365
1084 -12.93714705 0.838791576
1085   9.94668264 0.084457395
1086  -4.56061529 0.983605894
1087  -4.24795688 0.601732731
1088  -2.83740044 0.375102341
1089  -0.43078317 0.403870303
1090  15.19689584 0.114826374
1091 -10.29920266 0.731582141
1092   6.01686515 0.641655876
1093   6.69431335 0.496723697
1094   4.62223602 0.328118236
1095  -1.74309026 0.072604771
1096  14.31971261 0.827101483
1097  -1.86629155 0.613346722
1098   8.30971428 0.274948560
1099   8.50080711 0.059822908
1100  -7.94061422 0.121069240
1101  -2.72096492 0.710791774
1102   3.33259421 0.398621625
1103   1.73248470 0.488581205
1104   9.56008489 0.011104565
1105  12.71499762 0.038568985
1106   4.11512127 0.219846314
1107  -0.96707584 0.822646857
1108   4.98621667 0.633779997
1109   4.69384821 0.295708955
1110  10.16008645 0.778287787
1111  -7.72973800 0.097096969
1112   2.87264210 0.796538177
1113   4.56095440 0.862952770
1114   5.02621658 0.934628629
1115   3.18138681 0.805600816
1116  -1.02245780 0.317640678
1117  18.16001652 0.992503640
1118   4.13729026 0.941910149
1119   1.61211303 0.377271914
1120   1.71520009 0.735196094
1121   3.26325421 0.514432564
1122  12.94663819 0.591190711
1123  10.53239931 0.005877708
1124   8.06705056 0.340779884
1125  -5.09007267 0.332516161
1126  12.31973355 0.323119296
1127  -2.69957650 0.633232996
1128  12.51207803 0.377641090
1129   8.02081444 0.859293157
1130  -0.13098726 0.099370804
1131  -0.97757546 0.852873609
1132  16.73605399 0.595854575
1133   3.63219184 0.329310613
1134  -4.79105630 0.247760146
1135  -4.77209495 0.708235587
1136   0.92107647 0.924567254
1137  12.12724271 0.433550712
1138  -5.07731478 0.200109463
1139   9.16019579 0.897456586
1140  18.33260560 0.649877409
1141   1.93596773 0.584401505
1142   8.51254631 0.283154523
1143  11.41092928 0.698703314
1144  10.85035748 0.351078210
1145  12.62749979 0.570101319
1146  -2.32028296 0.313842122
1147  -2.45778301 0.007943144
1148   6.93102526 0.108737491
1149  -0.67304654 0.245399613
1150   9.27294774 0.204010286
1151  14.29292826 0.396294626
1152  14.05843185 0.864613328
1153  -3.73515954 0.305862948
1154   0.36606339 0.116802407
1155  -5.79235478 0.457308058
1156   8.70346900 0.858244380
1157  -8.91321043 0.077001581
1158   0.58499566 0.503209780
1159   0.39160153 0.324883353
1160   7.46715326 0.343451039
1161  12.36256009 0.679483638
1162   8.84283689 0.687359177
1163  -6.39396909 0.113065562
1164  -3.67844896 0.667335667
1165   9.36904962 0.009815419
1166  -3.25244888 0.213105120
1167  19.09389976 0.593130536
1168   7.28826611 0.829483570
1169  -5.44565944 0.956490203
1170   7.96993416 0.770961635
1171   0.20683778 0.006497153
1172  -3.73273760 0.037042812
1173 -10.64745846 0.813594448
1174   5.70578906 0.157678242
1175   4.05282218 0.224663656
1176  14.77711159 0.577586777
1177   0.89685942 0.297213941
1178   3.92600687 0.672347849
1179 -12.29347477 0.367072171
1180  -9.33603480 0.456544225
1181  -0.86683190 0.088696811
1182   4.65685745 0.779783359
1183   1.24438030 0.712958633
1184  11.43533814 0.920345548
1185 -10.18380242 0.044456697
1186  -1.20684029 0.992051648
1187  -9.78059038 0.611477837
1188   3.05588762 0.581933667
1189   3.47419279 0.769325101
1190   0.87528245 0.455214184
1191  -3.13185655 0.805887381
1192  -0.82283965 0.707668384
1193  -1.86717272 0.984060013
1194  16.56357048 0.217369677
1195  -2.11052646 0.474156371
1196  -1.39795364 0.958554209
1197   4.87468692 0.328779186
1198   2.69163553 0.401633221
1199   6.08640626 0.599963560
1200   7.41420081 0.240202007
1201   5.73729928 0.696034193
1202   7.31747120 0.569520861
1203  -6.20465547 0.214005920
1204  17.52477873 0.667125450
1205  12.97855692 0.796977778
1206  -3.35883428 0.379721403
1207  -2.90306972 0.552454626
1208   5.31617371 0.401625473
1209  -3.86414389 0.830986352
1210 -14.94107832 0.702705123
1211  -5.74060402 0.833328045
1212  -8.10116203 0.078855027
1213  23.48247017 0.568666620
1214  20.22005082 0.357069809
1215  -2.53387193 0.637455425
1216  15.72048831 0.845354124
1217  -4.41494567 0.934471473
1218  -8.02254420 0.378467959
1219  -0.13398716 0.489382793
1220   0.95967155 0.813667919
1221   0.14835664 0.215786848
1222  14.31875579 0.675145039
1223  -6.36589196 0.822037848
1224   8.25942906 0.156787526
1225  -7.33597529 0.051076292
1226  12.58936771 0.666507807
1227   2.34653798 0.626196518
1228  -0.69351398 0.050664564
1229   7.08738260 0.808776877
1230   5.19653521 0.779008623
1231   3.20900427 0.197212774
1232   7.81171331 0.744975548
1233   6.49008186 0.991318119
1234   7.27471854 0.839642650
1235  -7.68367290 0.880500743
1236  12.04846713 0.797754890
1237  14.93435279 0.190527791
1238  -3.83641079 0.075995951
1239   2.15090497 0.426560973
1240  -3.61166623 0.777188818
1241   8.49333248 0.891445999
1242  -7.46936100 0.148607446
1243  13.85406193 0.983656455
1244  12.20477754 0.499345090
1245  10.09415710 0.638127733
1246   5.37134772 0.110929011
1247   8.17660840 0.879411588
1248  -4.38804367 0.608933700
1249 -11.78145902 0.265134740
1250   6.18940186 0.970982743
1251 -16.24831477 0.844983635
1252   9.52790402 0.578152651
1253  16.44372225 0.264144422
1254  -2.48286428 0.893865621
1255   5.33297280 0.512990215
1256  -2.68912507 0.851636020
1257   9.94607707 0.644483197
1258  -1.93526852 0.550759844
1259   2.34310539 0.787853650
1260  11.79131608 0.983668283
1261   3.16689104 0.605394987
1262  10.47759320 0.919442774
1263   2.86973133 0.557835916
1264  10.30674302 0.442504870
1265  10.92820575 0.976183635
1266   7.98050212 0.139334994
1267  -0.64719705 0.981199028
1268  -2.63625596 0.341524563
1269  11.38799583 0.858987904
1270   1.37321916 0.202373294
1271  12.66698520 0.142127091
1272   5.83599540 0.864497670
1273   4.88659560 0.472598564
1274  13.00108599 0.961629827
1275   5.79514791 0.408377170
1276  -1.47807631 0.536772872
1277  -3.38142805 0.288956265
1278   6.25154986 0.828695103
1279   2.40919373 0.478123848
1280   3.72990486 0.056539500
1281  -9.90915815 0.603356617
1282   0.21737084 0.737251896
1283   5.36929388 0.026920178
1284  -1.05027354 0.034992509
1285  -4.97887624 0.506301429
1286  -6.40058435 0.014061876
1287  -0.14610837 0.619699963
1288   3.78483619 0.653952701
1289   3.84143365 0.162122572
1290   2.66030676 0.196542503
1291 -10.56809462 0.386200215
1292  -5.01140125 0.711703654
1293  -3.09809005 0.118120179
1294  -2.76110171 0.118809515
1295   2.85825107 0.129646974
1296   2.75993661 0.171779333
1297  11.55931169 0.372165133
1298   9.21211486 0.969079819
1299   6.02207148 0.498965865
1300  -3.52883224 0.954619249
1301  -2.60190803 0.069405278
1302   1.34183694 0.569402487
1303 -11.35155228 0.766344735
1304   1.04661568 0.023673810
1305  -1.90461932 0.179728300
1306  13.72465582 0.467775796
1307  19.14882438 0.476924297
1308  -1.07480326 0.944407858
1309  -8.44289331 0.059804028
1310   1.89732882 0.743225795
1311  -7.87832463 0.672539050
1312 -12.24163608 0.916803014
1313 -12.77212790 0.648129714
1314   6.39197262 0.622954436
1315   5.26261666 0.494421400
1316 -10.65239640 0.695527931
1317   4.63841458 0.499519163
1318  -2.94276544 0.429201572
1319   4.68788953 0.639613685
1320  -1.03031400 0.349342009
1321  -2.69946354 0.221796918
1322 -15.32237714 0.631289988
1323  -8.31962698 0.925363812
1324  -5.80897714 0.833536878
1325   7.16070989 0.832098478
1326 -10.99679727 0.794048223
1327   0.84514458 0.748014415
1328   2.23308495 0.111176288
1329   3.56351018 0.599805508
1330   0.88336430 0.746908710
1331 -14.63461670 0.314391808
1332   4.39039715 0.079604833
1333  -7.07001439 0.633705345
1334   2.11252583 0.461468123
1335   7.60219364 0.497389476
1336  -4.87713428 0.039952736
1337   2.17515292 0.421830084
1338   0.64302362 0.267982804
1339 -22.29371533 0.646257366
1340   0.31652779 0.060548371
1341   7.93445046 0.343570449
1342   0.28292029 0.651909785
1343   2.77775640 0.637679287
1344   6.22941586 0.291132945
1345  23.68567532 0.708513840
1346   9.49503014 0.645200206
1347   0.87405420 0.063154289
1348  -4.04931224 0.110797498
1349   8.91607239 0.732917195
1350  -5.77728018 0.635435595
1351 -16.37296319 0.343727613
1352   9.87409940 0.774177478
1353  -8.11360210 0.377765616
1354  14.54242540 0.204343527
1355   0.36239636 0.115528352
1356  19.51009176 0.181365423
1357   1.23592729 0.011676577
1358 -15.81877035 0.767155028
1359  -0.05911251 0.737944231
1360  -6.55395965 0.214062137
1361  -7.85591487 0.539865054
1362  -9.73010882 0.730924287
1363  11.79433862 0.267116856
1364  -8.84308360 0.088069165
1365  -5.56689174 0.405987947
1366   7.59010135 0.655631611
1367  10.07629305 0.031106157
1368  -6.19331485 0.052350502
1369  -4.58626710 0.326901540
1370  -5.19431549 0.125740555
1371  -2.08129025 0.034657174
1372 -10.48798034 0.153632237
1373  13.04657686 0.317295703
1374   1.94142067 0.731437668
1375  -1.62470735 0.701070475
1376 -12.27046912 0.505781742
1377  -2.96095228 0.122808075
1378  -2.91847765 0.372668438
1379 -14.83230131 0.100749725
1380  16.57350659 0.707854947
1381  10.05473238 0.244046174
1382   5.50858969 0.070691273
1383   7.65309196 0.245393047
1384   7.16359996 0.056261015
1385   4.33026356 0.318855549
1386  -4.65721575 0.271249938
1387   2.85909691 0.309377566
1388   3.02736080 0.553944209
1389   6.22796768 0.763945813
1390  -4.47036396 0.197721195
1391   2.78901176 0.441166128
1392  -9.94574794 0.964660659
1393   1.86451969 0.704635530
1394 -10.38926659 0.772304221
1395  -5.36565800 0.029527218
1396   1.99230152 0.578448308
1397  13.65547415 0.936050102
1398  -2.05229879 0.851521142
1399   0.99504588 0.974891334
1400  -1.46027404 0.320227281
1401  -8.45614275 0.727910071
1402  -0.95201934 0.199101032
1403  -2.46642929 0.462252060
1404  -6.44060430 0.703637604
1405  -2.58115910 0.084948525
1406   0.76248197 0.125769097
1407  12.00603845 0.675927328
1408   1.97538215 0.782502470
1409   2.23331320 0.870228155
1410  -3.10226060 0.485056198
1411  12.59337170 0.584729095
1412  -2.42247402 0.387588168
1413   9.41981063 0.374604221
1414   6.26806243 0.727453335
1415  -5.30630356 0.427294265
1416  13.81542647 0.394246994
1417   1.05647858 0.646684666
1418 -12.25005208 0.010531726
1419  -4.58162076 0.077133994
1420   0.58094190 0.400275636
1421   5.79443858 0.641731247
1422   8.87635216 0.913593476
1423   9.71048520 0.955285711
1424  13.10563373 0.908471848
1425   4.99194220 0.967014095
1426  15.88178853 0.041518216
1427   9.35962068 0.864770023
1428  -7.53095731 0.300106124
1429  12.18427585 0.248876997
1430   9.22034502 0.450149366
1431  -1.02861237 0.684246939
1432  -2.98140404 0.326901490
1433  -4.64316598 0.425381055
1434  15.35233259 0.630774937
1435  -1.85655250 0.226889991
1436  15.43748330 0.584219351
1437  10.39060893 0.387854461
1438   2.80705696 0.564024865
1439   3.48201221 0.787103673
1440   7.03787977 0.112019552
1441   8.41853061 0.798376796
1442  15.63925527 0.873984550
1443  -4.05742183 0.699131238
1444   6.56954685 0.720018710
1445   2.44007265 0.232697343
1446   3.75597926 0.975133449
1447   2.92362149 0.290975435
1448  -4.74372257 0.003738451
1449   1.28365940 0.987536495
1450  15.65288265 0.179629701
1451 -11.76385004 0.850614822
1452   1.56331228 0.592017435
1453  -9.64774741 0.024951969
1454  -9.44879860 0.993960270
1455  29.33340056 0.913358233
1456   7.97233120 0.021820585
1457 -12.10837953 0.401535846
1458  -1.20729618 0.984977268
1459   3.63219301 0.491142613
1460   2.79853507 0.663823888
1461   3.19584583 0.612511282
1462  -0.81790885 0.908769330
1463  -1.67795944 0.611690031
1464   2.55137163 0.109447998
1465   4.36572889 0.382049700
1466  -6.35667866 0.162787163
1467  -0.76239101 0.892383562
1468  -3.99558996 0.466572017
1469  -0.47513018 0.457760464
1470 -10.69568261 0.544872910
1471   4.30943512 0.982456072
1472   2.91825703 0.823403368
1473   0.10753188 0.945676881
1474  -8.38623073 0.923085521
1475   4.95690232 0.188128654
1476   5.39956649 0.331692462
1477  -1.47421789 0.327711090
1478  -1.81689665 0.713285385
1479   5.15137860 0.414906436
1480   5.68897151 0.110799415
1481   0.78825159 0.396824099
1482  -1.78376652 0.929264595
1483   0.76991060 0.950124414
1484  15.81469073 0.951245195
1485  -4.33820920 0.009896093
1486   1.67174323 0.821983745
1487   0.38997945 0.928857784
1488   1.97848484 0.175680230
1489  -5.81067801 0.772580245
1490 -10.45208478 0.418845035
1491  13.34024524 0.905645046
1492  -8.79585122 0.906516178
1493   2.89093397 0.113010960
1494   2.22324289 0.799940482
1495   8.95497981 0.984663669
1496   0.93288527 0.277914575
1497 -17.35306978 0.455587022
1498  -3.26914604 0.406757639
1499   8.75871227 0.067059659
1500   1.79914932 0.784879863
1501  -0.67305388 0.006393497
1502   1.66805704 0.039614073
1503   9.03868439 0.601066847
1504   4.29458670 0.015772820
1505  -8.15564320 0.939633197
1506  12.50538902 0.766347628
1507  -0.45547258 0.464314122
1508  -9.47180656 0.640114882
1509 -13.25567198 0.125841930
1510   2.87660101 0.381931128
1511   7.37834152 0.648958712
1512  -0.45874073 0.303139498
1513   4.87941450 0.500090729
1514   4.50344891 0.311329309
1515  -6.14257896 0.061368838
1516   5.98243271 0.873804882
1517  -2.64694079 0.080493398
1518 -17.79727796 0.188420116
1519 -13.52552336 0.798403568
1520   2.29086373 0.518700767
1521   5.21493652 0.788828533
1522  -8.09641615 0.775041349
1523   5.87005782 0.079447757
1524  10.74795720 0.955691540
1525  -8.01115709 0.004508053
1526  -7.53735064 0.054195934
1527  -6.79130165 0.877193354
1528  -1.26419539 0.837772170
1529   8.31082852 0.967509866
1530  21.83090247 0.261529880
1531  11.20453234 0.913858875
1532   7.19128396 0.541942489
1533  -2.93623595 0.860095891
1534  -3.61446403 0.022418065
1535  -6.59997709 0.532998307
1536   3.71486934 0.522669434
1537  18.03420874 0.295064126
1538  -8.75452291 0.390175021
1539  -7.83680812 0.263760724
1540  -1.10263921 0.501819826
1541   2.05633484 0.338684642
1542   5.25636848 0.558667384
1543  -7.33260497 0.457327559
1544   3.86721296 0.612182242
1545 -15.94331373 0.478329365
1546   3.71501899 0.264241588
1547  18.26175822 0.023212661
1548  -5.21093378 0.184378036
1549  -2.44074986 0.297114134
1550 -11.88339919 0.875956945
1551   7.52127093 0.927322099
1552   5.31597834 0.416344968
1553  11.42012314 0.952491078
1554  13.64950955 0.794183413
1555  12.50861255 0.390723282
1556  -3.48142207 0.538708662
1557  14.32910902 0.085221990
1558   5.76196699 0.313860477
1559   2.63751452 0.917424732
1560   2.99975231 0.208662214
1561   7.09852825 0.798246964
1562  -1.95742636 0.352166210
1563   7.80534904 0.386523123
1564  -4.47229047 0.290188493
1565  -4.35535158 0.761527294
1566   1.47083860 0.447897289
1567   3.09504296 0.048513534
1568   3.50446804 0.925072429
1569  12.00487617 0.574499971
1570  10.35171466 0.934193962
1571  -5.63256003 0.968833982
1572   7.15625220 0.467160468
1573  -7.81378393 0.790220187
1574   4.52101003 0.014459969
1575  12.90773453 0.990835752
1576   7.70737851 0.785329264
1577  -3.37196794 0.066025357
1578  -5.12793918 0.347459322
1579  -7.96083724 0.216608294
1580  12.81247279 0.287880308
1581   4.63872463 0.426881173
1582  -3.85439309 0.336532356
1583   4.55633320 0.108001536
1584  -2.40824634 0.135247519
1585   1.65932541 0.005108006
1586   3.26129578 0.093163961
1587  -3.52114597 0.544041275
1588  -9.08479260 0.111212700
1589   7.75150456 0.942726234
1590   7.44829768 0.396996218
1591  14.44430576 0.525470762
1592  -2.13457508 0.207577358
1593   9.74871681 0.537177845
1594  -4.53338693 0.625854028
1595  16.15962824 0.947933141
1596  -0.17711664 0.480940902
1597  -7.21470818 0.006952612
1598  -6.27644212 0.737909602
1599  -0.81648165 0.230003567
1600  -2.10429152 0.209671398
1601   7.69291241 0.987903443
1602  -0.32284504 0.183904658
1603  -0.90833921 0.782169770
1604  10.35542238 0.201758865
1605  10.40788689 0.540802365
1606  10.80011849 0.298263948
1607   7.39943598 0.785716539
1608 -12.71674257 0.154135834
1609  16.67139866 0.116794235
1610  12.47832985 0.998179468
1611   3.24041348 0.653080096
1612  -5.50381593 0.995396942
1613 -10.41952811 0.576472768
1614   4.33514092 0.146434686
1615   4.41294276 0.507165968
1616  -0.14746982 0.698144836
1617  -1.33323051 0.466481571
1618  -7.01201350 0.797150114
1619   6.58669848 0.942287809
1620   7.19444974 0.053569397
1621  -5.66046997 0.435728340
1622  -5.07828702 0.497727572
1623  13.72045272 0.324222944
1624   9.99111984 0.355713969
1625  -4.42363728 0.071790181
1626  -2.34300923 0.618434528
1627   4.98594041 0.605667438
1628  -2.45307721 0.894546647
1629  -3.52276424 0.760086779
1630  -3.69489441 0.960758209
1631  13.04792817 0.511273320
1632  21.61433486 0.236270637
1633  -9.57303968 0.964235539
1634  11.70400744 0.391045695
1635   4.25170422 0.411577090
1636   7.87516537 0.952858161
1637   9.89202673 0.971106687
1638   7.51554467 0.505791978
1639   2.17944879 0.893835908
1640   0.82420351 0.213912155
1641   2.47121932 0.688019842
1642 -14.88503628 0.640950883
1643   8.16032283 0.277742858
1644  -4.65776244 0.129415853
1645   7.48274838 0.074213153
1646   7.70537066 0.476778957
1647   5.88202944 0.351838898
1648   1.95618325 0.106331699
1649   7.22064623 0.511434587
1650 -18.64632081 0.009314188
1651  -6.16794611 0.526204245
1652   2.14042033 0.675800465
1653  -1.89535048 0.916845690
1654  -7.77156605 0.069742819
1655  -6.84078801 0.865082345
1656   8.17539904 0.095895629
1657  10.75170309 0.821383078
1658  14.31498805 0.117893208
1659  -2.82264467 0.809086411
1660   0.11117380 0.400587471
1661   6.43898314 0.333163663
1662   9.48110784 0.465173316
1663   5.39395511 0.695273081
1664  -2.05636570 0.508060862
1665   0.68666117 0.647109494
1666  -6.41880322 0.267530762
1667  -0.12096589 0.986901165
1668   6.46062643 0.588580914
1669  -4.20926136 0.550783675
1670   4.07354300 0.907963701
1671  10.84045143 0.900920521
1672   2.64504664 0.767700269
1673  10.34578229 0.197810342
1674  -0.19222273 0.281932395
1675   3.47400952 0.977555902
1676  11.04549389 0.694010579
1677   6.79729856 0.056652433
1678   9.28300628 0.598930531
1679  -3.53453282 0.183412212
1680   8.04028248 0.250746943
1681   5.75964045 0.424692336
1682  -4.98252741 0.867446071
1683  12.00352175 0.289615080
1684   7.53497791 0.350915526
1685   2.54579776 0.655113837
1686  -9.29572208 0.900136667
1687   6.41659249 0.100570650
1688   7.37095646 0.907179211
1689 -12.78417775 0.262214556
1690   0.87962107 0.624657444
1691  -5.96939907 0.296725805
1692  -2.56857339 0.604065931
1693   4.27131811 0.962952479
1694  21.72603838 0.442485270
1695   6.10056565 0.418383130
1696  10.48099521 0.333593221
1697  19.28363092 0.382408442
1698   2.12080726 0.601206970
1699  -6.82450704 0.740158518
1700  11.32395692 0.627015570
1701   5.00040701 0.476274658
1702 -11.64750733 0.105099095
1703   5.77442654 0.576560214
1704   0.31340364 0.516479036
1705  -2.09881449 0.146089191
1706   5.12411327 0.368130477
1707   1.70530391 0.621828438
1708 -12.95649749 0.355726301
1709   8.43735652 0.275383759
1710 -15.56161079 0.413160084
1711   5.28942694 0.069125495
1712   5.96040877 0.438716686
1713  -2.59318107 0.571116303
1714   6.95988992 0.650760909
1715  14.00074797 0.623645969
1716   1.66101456 0.558763985
1717  -2.57968349 0.648185379
1718  -5.47584253 0.716901151
1719   6.37222581 0.060563130
1720   2.83664864 0.842419730
1721   1.48926558 0.620280308
1722   0.33471689 0.170312461
1723   5.21648412 0.317639631
1724   0.51733642 0.843867329
1725   9.86005834 0.306036746
1726  -5.81145791 0.975655452
1727  -5.43219061 0.303385368
1728   5.87157118 0.677369776
1729   2.08889926 0.310200439
1730  -2.53433085 0.194730908
1731   7.01359575 0.674259533
1732  -2.00936260 0.682056466
1733  -2.98240739 0.787899917
1734  -7.43289210 0.357483044
1735 -12.58905988 0.981387385
1736   5.78095517 0.533526274
1737  -1.23065889 0.687266774
1738  -6.82309960 0.293249774
1739   8.47000829 0.842056399
1740  -5.81624772 0.303700280
1741 -14.83571031 0.311387926
1742   4.66808472 0.091222946
1743  -2.90144463 0.438301785
1744  10.62458662 0.828335698
1745   7.88002491 0.990156110
1746  10.27680283 0.251087079
1747  -9.42498970 0.292462244
1748   6.73027640 0.213065205
1749   1.28169895 0.353152789
1750 -14.29203733 0.264563048
1751  20.35772711 0.265208837
1752   3.55095071 0.242905653
1753 -17.97067670 0.373951756
1754  10.53141139 0.247520698
1755   0.05293205 0.579940423
1756  12.79674707 0.288031751
1757  -5.44235185 0.075899079
1758  14.29464811 0.960707538
1759  -1.36753291 0.124265178
1760  -4.25946974 0.521720352
1761 -12.46519252 0.385503339
1762  -6.65343143 0.540942219
1763   5.55949184 0.143194404
1764  -1.20480594 0.515905644
1765  -4.13839908 0.164461445
1766  -2.21345425 0.812969725
1767   3.94223380 0.229238952
1768 -10.78661097 0.395049514
1769   3.06997341 0.791234255
1770  24.82205477 0.110859039
1771   6.28791249 0.867125744
1772  -2.80296119 0.703583849
1773  13.24274039 0.425951975
1774  -0.19577471 0.361568727
1775  -2.34894781 0.954814545
1776  19.76339577 0.635462177
1777  -1.87591480 0.149121567
1778  -7.70962391 0.711708342
1779  -2.46291902 0.390902746
1780 end data
1781 regression /variables=v0 v1 /statistics defaults /dependent=v0 /method=enter.
1782 ])
1783
1784 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
1785 Table: Reading free-form data from INLINE.
1786 Variable,Format
1787 v0,F8.0
1788 v1,F8.0
1789
1790 Table: Model Summary (v0)
1791 R,R Square,Adjusted R Square,Std. Error of the Estimate
1792 .05,.00,.00,8.11
1793
1794 Table: ANOVA (v0)
1795 ,Sum of Squares,df,Mean Square,F,Sig.
1796 Regression,235.23,1,235.23,3.58,.059
1797 Residual,98438.40,1498,65.71,,
1798 Total,98673.63,1499,,,
1799
1800 Table: Coefficients (v0)
1801 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
1802 ,B,Std. Error,Beta,,
1803 (Constant),1.24,.42,.00,2.95,.003
1804 v1,1.37,.72,.05,1.89,.059
1805 ])
1806
1807 AT_CLEANUP
1808
1809 AT_SETUP([LINEAR REGRESSION no crash on all missing])
1810 AT_DATA([regcrash.sps], [dnl
1811 data list list /x * y.
1812 begin data.
1813  . .
1814  . .
1815  . .
1816  . .
1817  . .
1818  . .
1819  . .
1820  . .
1821  . .
1822  . .
1823 end data.
1824
1825
1826 regression /variables=x y /dependent=y.
1827 ])
1828
1829 AT_CHECK([pspp -o pspp.csv regcrash.sps], [1], [ignore], [ignore])
1830
1831 AT_CLEANUP
1832
1833
1834
1835 AT_SETUP([LINEAR REGRESSION missing dependent variable])
1836
1837 dnl Test for a bug where missing values in the dependent variable were not being
1838 dnl ignored like they should have been.
1839 AT_DATA([reg-mdv-ref.sps], [dnl
1840 data list notable list / v0 to v2.
1841 begin data
1842  0.65377128  7.735648 -23.97588
1843 -0.13087553  6.142625 -19.63854
1844  0.34880368  7.651430 -25.26557
1845  0.69249021  6.125125 -16.57090
1846 -0.07368178  8.245789 -25.80001
1847 -0.34404919  6.031540 -17.56743
1848  0.75981559  9.832291 -28.35977
1849 -0.46958313  5.343832 -16.79548
1850 -0.06108490  8.838262 -29.25689
1851  0.56154863  6.200189 -18.58219
1852 end data
1853 regression /variables=v0 v1
1854              /statistics defaults
1855              /dependent=v2
1856              /method=enter.
1857 ])
1858
1859 AT_CHECK([pspp -o pspp-ref.csv reg-mdv-ref.sps])
1860
1861 AT_DATA([reg-mdv.sps], [dnl
1862 data list notable list / v0 to v2.
1863 begin data
1864  0.65377128  7.735648 -23.97588
1865 -0.13087553  6.142625 -19.63854
1866  0.34880368  7.651430 -25.26557
1867  0.69249021  6.125125 -16.57090
1868 -0.07368178  8.245789 -25.80001
1869 -0.34404919  6.031540 -17.56743
1870  0.75981559  9.832291 -28.35977
1871 -0.46958313  5.343832 -16.79548
1872 -0.06108490  8.838262 -29.25689
1873  0.56154863  6.200189 -18.58219
1874  0.5         8         9
1875 end data
1876
1877 missing values v2 (9).
1878
1879 regression /variables=v0 v1
1880              /statistics defaults
1881              /dependent=v2
1882              /method=enter.
1883 ])
1884
1885 AT_CHECK([pspp -o pspp.csv reg-mdv.sps])
1886
1887 AT_CHECK([diff pspp.csv pspp-ref.csv])
1888
1889
1890 AT_CLEANUP
1891
1892 AT_SETUP([LINEAR REGRESSION with invalid syntax (and empty dataset)])
1893
1894 AT_DATA([ss.sps], [dnl
1895 data list notable list / v0 to v2.
1896 begin data
1897 end data.
1898
1899 regression /variables=v0 v1
1900              /statistics r coeff anova
1901              /dependent=v2
1902              /method=enter v2.
1903 ])
1904
1905 AT_CHECK([pspp ss.sps], [1], [ignore])
1906
1907 AT_CLEANUP
1908
1909
1910 dnl The following example comes from
1911 dnl http://www.ats.ucla.edu/stat/spss/output/reg_spss%28long%29.htm
1912 AT_SETUP([LINEAR REGRESSION coefficient confidence interval])
1913
1914 AT_DATA([conf.sps], [dnl
1915 set format = F22.3.
1916
1917 data list notable list /math female socst read science *
1918 begin data.
1919     41.00       .00     57.00     57.00     47.00
1920     53.00      1.00     61.00     68.00     63.00
1921     54.00       .00     31.00     44.00     58.00
1922     47.00       .00     56.00     63.00     53.00
1923     57.00       .00     61.00     47.00     53.00
1924     51.00       .00     61.00     44.00     63.00
1925     42.00       .00     61.00     50.00     53.00
1926     45.00       .00     36.00     34.00     39.00
1927     54.00       .00     51.00     63.00     58.00
1928     52.00       .00     51.00     57.00     50.00
1929     51.00       .00     61.00     60.00     53.00
1930     51.00       .00     61.00     57.00     63.00
1931     71.00       .00     71.00     73.00     61.00
1932     57.00       .00     46.00     54.00     55.00
1933     50.00       .00     56.00     45.00     31.00
1934     43.00       .00     56.00     42.00     50.00
1935     51.00       .00     56.00     47.00     50.00
1936     60.00       .00     56.00     57.00     58.00
1937     62.00       .00     61.00     68.00     55.00
1938     57.00       .00     46.00     55.00     53.00
1939     35.00       .00     41.00     63.00     66.00
1940     75.00       .00     66.00     63.00     72.00
1941     45.00       .00     56.00     50.00     55.00
1942     57.00       .00     61.00     60.00     61.00
1943     45.00       .00     46.00     37.00     39.00
1944     46.00       .00     31.00     34.00     39.00
1945     66.00       .00     66.00     65.00     61.00
1946     57.00       .00     46.00     47.00     58.00
1947     49.00       .00     46.00     44.00     39.00
1948     49.00       .00     41.00     52.00     55.00
1949     57.00       .00     51.00     42.00     47.00
1950     64.00       .00     61.00     76.00     64.00
1951     63.00       .00     71.00     65.00     66.00
1952     57.00       .00     31.00     42.00     72.00
1953     50.00       .00     61.00     52.00     61.00
1954     58.00       .00     66.00     60.00     61.00
1955     75.00       .00     66.00     68.00     66.00
1956     68.00       .00     66.00     65.00     66.00
1957     44.00       .00     36.00     47.00     36.00
1958     40.00       .00     51.00     39.00     39.00
1959     41.00       .00     51.00     47.00     42.00
1960     62.00       .00     51.00     55.00     58.00
1961     57.00       .00     51.00     52.00     55.00
1962     43.00       .00     41.00     42.00     50.00
1963     48.00       .00     66.00     65.00     63.00
1964     63.00       .00     46.00     55.00     69.00
1965     39.00       .00     47.00     50.00     49.00
1966     70.00       .00     51.00     65.00     63.00
1967     63.00       .00     46.00     47.00     53.00
1968     59.00       .00     51.00     57.00     47.00
1969     61.00       .00     56.00     53.00     57.00
1970     38.00       .00     41.00     39.00     47.00
1971     61.00       .00     46.00     44.00     50.00
1972     49.00       .00     71.00     63.00     55.00
1973     73.00       .00     66.00     73.00     69.00
1974     44.00       .00     42.00     39.00     26.00
1975     42.00       .00     32.00     37.00     33.00
1976     39.00       .00     46.00     42.00     56.00
1977     55.00       .00     41.00     63.00     58.00
1978     52.00       .00     51.00     48.00     44.00
1979     45.00       .00     61.00     50.00     58.00
1980     61.00       .00     66.00     47.00     69.00
1981     39.00       .00     46.00     44.00     34.00
1982     41.00       .00     36.00     34.00     36.00
1983     50.00       .00     61.00     50.00     36.00
1984     40.00       .00     26.00     44.00     50.00
1985     60.00       .00     66.00     60.00     55.00
1986     47.00       .00     26.00     47.00     42.00
1987     59.00       .00     44.00     63.00     65.00
1988     49.00       .00     36.00     50.00     44.00
1989     46.00       .00     51.00     44.00     39.00
1990     58.00       .00     61.00     60.00     58.00
1991     71.00       .00     66.00     73.00     63.00
1992     58.00       .00     66.00     68.00     74.00
1993     46.00       .00     51.00     55.00     58.00
1994     43.00       .00     31.00     47.00     45.00
1995     54.00       .00     61.00     55.00     49.00
1996     56.00       .00     66.00     68.00     63.00
1997     46.00       .00     46.00     31.00     39.00
1998     54.00       .00     56.00     47.00     42.00
1999     57.00       .00     56.00     63.00     55.00
2000     54.00       .00     36.00     36.00     61.00
2001     71.00       .00     56.00     68.00     66.00
2002     48.00       .00     56.00     63.00     63.00
2003     40.00       .00     41.00     55.00     44.00
2004     64.00       .00     66.00     55.00     63.00
2005     51.00       .00     56.00     52.00     53.00
2006     39.00       .00     56.00     34.00     42.00
2007     40.00       .00     31.00     50.00     34.00
2008     61.00       .00     56.00     55.00     61.00
2009     66.00       .00     46.00     52.00     47.00
2010     49.00       .00     46.00     63.00     66.00
2011     65.00      1.00     61.00     68.00     69.00
2012     52.00      1.00     48.00     39.00     44.00
2013     46.00      1.00     51.00     44.00     47.00
2014     61.00      1.00     51.00     50.00     63.00
2015     72.00      1.00     56.00     71.00     66.00
2016     71.00      1.00     71.00     63.00     69.00
2017     40.00      1.00     41.00     34.00     39.00
2018     69.00      1.00     61.00     63.00     61.00
2019     64.00      1.00     66.00     68.00     69.00
2020     56.00      1.00     61.00     47.00     66.00
2021     49.00      1.00     41.00     47.00     33.00
2022     54.00      1.00     51.00     63.00     50.00
2023     53.00      1.00     51.00     52.00     61.00
2024     66.00      1.00     56.00     55.00     42.00
2025     67.00      1.00     56.00     60.00     50.00
2026     40.00      1.00     33.00     35.00     51.00
2027     46.00      1.00     56.00     47.00     50.00
2028     69.00      1.00     71.00     71.00     58.00
2029     40.00      1.00     56.00     57.00     61.00
2030     41.00      1.00     51.00     44.00     39.00
2031     57.00      1.00     66.00     65.00     46.00
2032     58.00      1.00     56.00     68.00     59.00
2033     57.00      1.00     66.00     73.00     55.00
2034     37.00      1.00     41.00     36.00     42.00
2035     55.00      1.00     46.00     43.00     55.00
2036     62.00      1.00     66.00     73.00     58.00
2037     64.00      1.00     56.00     52.00     58.00
2038     40.00      1.00     51.00     41.00     39.00
2039     50.00      1.00     51.00     60.00     50.00
2040     46.00      1.00     56.00     50.00     50.00
2041     53.00      1.00     56.00     50.00     39.00
2042     52.00      1.00     46.00     47.00     48.00
2043     45.00      1.00     46.00     47.00     34.00
2044     56.00      1.00     61.00     55.00     58.00
2045     45.00      1.00     56.00     50.00     44.00
2046     54.00      1.00     41.00     39.00     50.00
2047     56.00      1.00     46.00     50.00     47.00
2048     41.00      1.00     26.00     34.00     29.00
2049     54.00      1.00     56.00     57.00     50.00
2050     72.00      1.00     56.00     57.00     54.00
2051     56.00      1.00     51.00     68.00     50.00
2052     47.00      1.00     46.00     42.00     47.00
2053     49.00      1.00     66.00     61.00     44.00
2054     60.00      1.00     66.00     76.00     67.00
2055     54.00      1.00     46.00     47.00     58.00
2056     55.00      1.00     56.00     46.00     44.00
2057     33.00      1.00     41.00     39.00     42.00
2058     49.00      1.00     61.00     52.00     44.00
2059     43.00      1.00     51.00     28.00     44.00
2060     50.00      1.00     52.00     42.00     50.00
2061     52.00      1.00     51.00     47.00     39.00
2062     48.00      1.00     41.00     47.00     44.00
2063     58.00      1.00     66.00     52.00     53.00
2064     43.00      1.00     61.00     47.00     48.00
2065     41.00      1.00     31.00     50.00     55.00
2066     43.00      1.00     51.00     44.00     44.00
2067     46.00      1.00     41.00     47.00     40.00
2068     44.00      1.00     41.00     45.00     34.00
2069     43.00      1.00     46.00     47.00     42.00
2070     61.00      1.00     56.00     65.00     58.00
2071     40.00      1.00     51.00     43.00     50.00
2072     49.00      1.00     61.00     47.00     53.00
2073     56.00      1.00     66.00     57.00     58.00
2074     61.00      1.00     71.00     68.00     55.00
2075     50.00      1.00     61.00     52.00     54.00
2076     51.00      1.00     61.00     42.00     47.00
2077     42.00      1.00     41.00     42.00     42.00
2078     67.00      1.00     66.00     66.00     61.00
2079     53.00      1.00     61.00     47.00     53.00
2080     50.00      1.00     58.00     57.00     51.00
2081     51.00      1.00     31.00     47.00     63.00
2082     72.00      1.00     61.00     57.00     61.00
2083     48.00      1.00     61.00     52.00     55.00
2084     40.00      1.00     31.00     44.00     40.00
2085     53.00      1.00     61.00     50.00     61.00
2086     39.00      1.00     36.00     39.00     47.00
2087     63.00      1.00     41.00     57.00     55.00
2088     51.00      1.00     37.00     57.00     53.00
2089     45.00      1.00     43.00     42.00     50.00
2090     39.00      1.00     61.00     47.00     47.00
2091     42.00      1.00     39.00     42.00     31.00
2092     62.00      1.00     51.00     60.00     61.00
2093     44.00      1.00     51.00     44.00     35.00
2094     65.00      1.00     66.00     63.00     54.00
2095     63.00      1.00     71.00     65.00     55.00
2096     54.00      1.00     41.00     39.00     53.00
2097     45.00      1.00     36.00     50.00     58.00
2098     60.00      1.00     51.00     52.00     56.00
2099     49.00      1.00     51.00     60.00     50.00
2100     48.00      1.00     51.00     44.00     39.00
2101     57.00      1.00     61.00     52.00     63.00
2102     55.00      1.00     61.00     55.00     50.00
2103     66.00      1.00     56.00     50.00     66.00
2104     64.00      1.00     71.00     65.00     58.00
2105     55.00      1.00     51.00     52.00     53.00
2106     42.00      1.00     36.00     47.00     42.00
2107     56.00      1.00     61.00     63.00     55.00
2108     53.00      1.00     66.00     50.00     53.00
2109     41.00      1.00     41.00     42.00     42.00
2110     42.00      1.00     41.00     36.00     50.00
2111     53.00      1.00     56.00     50.00     55.00
2112     42.00      1.00     51.00     41.00     34.00
2113     60.00      1.00     56.00     47.00     50.00
2114     52.00      1.00     56.00     55.00     42.00
2115     38.00      1.00     46.00     42.00     36.00
2116     57.00      1.00     52.00     57.00     55.00
2117     58.00      1.00     61.00     55.00     58.00
2118     65.00      1.00     61.00     63.00     53.00
2119 end data.
2120
2121 regression
2122  /variables = math female socst read
2123  /statistics = coeff r anova ci (95)
2124  /dependent = science
2125  /method = enter
2126 ])
2127
2128 AT_CHECK([pspp -O format=csv conf.sps], [0], [dnl
2129 Table: Model Summary (science)
2130 R,R Square,Adjusted R Square,Std. Error of the Estimate
2131 .699,.489,.479,7.148
2132
2133 Table: ANOVA (science)
2134 ,Sum of Squares,df,Mean Square,F,Sig.
2135 Regression,9543.721,4,2385.930,46.695,.000
2136 Residual,9963.779,195,51.096,,
2137 Total,19507.500,199,,,
2138
2139 Table: Coefficients (science)
2140 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.,95% Confidence Interval for B,
2141 ,B,Std. Error,Beta,,,Lower Bound,Upper Bound
2142 (Constant),12.325,3.194,.000,3.859,.000,6.027,18.624
2143 math,.389,.074,.368,5.252,.000,.243,.535
2144 female,-2.010,1.023,-.101,-1.965,.051,-4.027,.007
2145 socst,.050,.062,.054,.801,.424,-.073,.173
2146 read,.335,.073,.347,4.607,.000,.192,.479
2147 ])
2148
2149
2150 AT_CLEANUP
2151
2152
2153 dnl Checks for regression against bug #44877.
2154 AT_SETUP([LINEAR REGRESSION crash with long string variables])
2155 AT_DATA([regression.sps], [dnl
2156 SET DECIMAL=DOT.
2157
2158 DATA LIST notable LIST /text (A24) Y * X1 *
2159 BEGIN DATA.
2160 V00276601 0.00 90.00
2161 V00292909 10.00 30.00
2162 V00291204 20.00 20.00
2163 V00300070 0.00 90.00
2164 END DATA.
2165
2166 REGRESSION
2167 /VARIABLES= Y
2168 /DEPENDENT= X1
2169 /METHOD=ENTER
2170 /STATISTICS=COEFF R ANOVA
2171 /SAVE= RESID.
2172
2173 LIST.
2174 ])
2175 AT_CHECK([pspp -o pspp.csv regression.sps])
2176 AT_CHECK([cat pspp.csv], [0], [dnl
2177 Table: Model Summary (X1)
2178 R,R Square,Adjusted R Square,Std. Error of the Estimate
2179 .95,.89,.84,15.08
2180
2181 Table: ANOVA (X1)
2182 ,Sum of Squares,df,Mean Square,F,Sig.
2183 Regression,3820.45,1,3820.45,16.81,.055
2184 Residual,454.55,2,227.27,,
2185 Total,4275.00,3,,,
2186
2187 Table: Coefficients (X1)
2188 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
2189 ,B,Std. Error,Beta,,
2190 (Constant),85.45,10.16,.00,8.41,.004
2191 Y,-3.73,.91,-.95,-4.10,.055
2192
2193 Table: Data List
2194 text,Y,X1,RES1
2195 V00276601,.00,90.00,4.55
2196 V00292909,10.00,30.00,-18.18
2197 V00291204,20.00,20.00,9.09
2198 V00300070,.00,90.00,4.55
2199 ])
2200 AT_CLEANUP
2201
2202
2203 dnl Test for a crash which happened on bad input syntax
2204 AT_SETUP([LINEAR REGRESSION -- Empty Parentheses])
2205
2206 AT_DATA([empty-parens.sps], [dnl
2207 set format = F22.3.
2208
2209 data list notable list /math female socst read science *
2210 begin data.
2211     58.00      1.00     61.00     55.00     58.00
2212     65.00      1.00     61.00     63.00     53.00
2213 end data.
2214
2215 regression
2216  /variables = math female socst read
2217  /statistics = coeff r anova ci ()
2218  /dependent = science
2219  /method = enter
2220 ])
2221
2222 AT_CHECK([pspp -o pspp.csv empty-parens.sps], [1], [ignore])
2223
2224 AT_CLEANUP
2225
2226
2227
2228
2229 AT_SETUP([LINEAR REGRESSION varibles on ENTER subcommand])
2230 AT_DATA([regression.sps], [dnl
2231 SET FORMAT=F10.3.
2232
2233 DATA LIST notable LIST /number * value *.
2234 BEGIN DATA
2235  16 7.25
2236   0  .00
2237   1  .10
2238   9 27.9
2239   0  .00
2240   7 3.65
2241  14 16.8
2242  24 9.15
2243   0  .00
2244  24 19.0
2245   7 4.05
2246  12 7.90
2247   6  .75
2248  11 1.40
2249   0  .00
2250   3 2.30
2251  12 7.60
2252  11 6.80
2253  16 8.65
2254 END DATA.
2255
2256 REGRESSION
2257   /STATISTICS COEFF R ANOVA
2258   /DEPENDENT value
2259   /METHOD=ENTER number.
2260 ])
2261
2262
2263 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
2264 Table: Model Summary (value)
2265 R,R Square,Adjusted R Square,Std. Error of the Estimate
2266 .612,.374,.338,6.176
2267
2268 Table: ANOVA (value)
2269 ,Sum of Squares,df,Mean Square,F,Sig.
2270 Regression,388.065,1,388.065,10.173,.005
2271 Residual,648.498,17,38.147,,
2272 Total,1036.563,18,,,
2273
2274 Table: Coefficients (value)
2275 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
2276 ,B,Std. Error,Beta,,
2277 (Constant),.927,2.247,.000,.413,.685
2278 number,.611,.192,.612,3.189,.005
2279 ])
2280
2281 AT_CLEANUP
2282
2283
2284
2285 AT_SETUP([LINEAR REGRESSION /ORIGIN])
2286 AT_DATA([regression-origin.sps], [dnl
2287 SET FORMAT=F10.3.
2288
2289 DATA LIST notable LIST /number * value *.
2290 BEGIN DATA
2291  16 7.25
2292   0  .00
2293   1  .10
2294   9 27.9
2295   0  .00
2296   7 3.65
2297  14 16.8
2298  24 9.15
2299   0  .00
2300  24 19.0
2301   7 4.05
2302  12 7.90
2303   6  .75
2304  11 1.40
2305   0  .00
2306   3 2.30
2307  12 7.60
2308  11 6.80
2309  16 8.65
2310 END DATA.
2311
2312 REGRESSION
2313   /STATISTICS COEFF R ANOVA
2314   /DEPENDENT value
2315   /ORIGIN
2316   /METHOD=ENTER number.
2317 ])
2318
2319
2320 AT_CHECK([pspp -O format=csv regression-origin.sps], [0], [dnl
2321 Table: Model Summary (value)
2322 R,R Square,Adjusted R Square,Std. Error of the Estimate
2323 .802,.643,.622,6.032
2324
2325 Table: ANOVA (value)
2326 ,Sum of Squares,df,Mean Square,F,Sig.
2327 Regression,1181.726,1,1181.726,32.475,.000
2328 Residual,654.989,18,36.388,,
2329 Total,1836.715,19,,,
2330
2331 Table: Coefficients (value)
2332 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
2333 ,B,Std. Error,Beta,,
2334 number,.672,.118,.802,5.699,.000
2335 ])
2336
2337 AT_CLEANUP
2338
2339 dnl This is an example from doc/tutorial.texi
2340 dnl So if the results of this have to be changed in any way,
2341 dnl make sure to update that file.
2342 AT_SETUP([REGRESSION tutorial example])
2343 cp $top_srcdir/examples/repairs.sav .
2344 AT_DATA([regression.sps], [dnl
2345 GET FILE='repairs.sav'.
2346 REGRESSION /VARIABLES=mtbf duty_cycle /DEPENDENT=mttr.
2347 REGRESSION /VARIABLES=mtbf /DEPENDENT=mttr.
2348 ])
2349
2350 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
2351 Table: Model Summary (Mean time to repair (hours) )
2352 R,R Square,Adjusted R Square,Std. Error of the Estimate
2353 .94,.89,.88,6.54
2354
2355 Table: ANOVA (Mean time to repair (hours) )
2356 ,Sum of Squares,df,Mean Square,F,Sig.
2357 Regression,9576.26,2,4788.13,111.94,.000
2358 Residual,1154.94,27,42.78,,
2359 Total,10731.20,29,,,
2360
2361 Table: Coefficients (Mean time to repair (hours) )
2362 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
2363 ,B,Std. Error,Beta,,
2364 (Constant),10.59,3.11,.00,3.40,.002
2365 Mean time between failures (months) ,3.02,.20,.95,14.88,.000
2366 Ratio of working to non-working time,-1.12,3.69,-.02,-.30,.763
2367
2368 Table: Model Summary (Mean time to repair (hours) )
2369 R,R Square,Adjusted R Square,Std. Error of the Estimate
2370 .94,.89,.89,6.43
2371
2372 Table: ANOVA (Mean time to repair (hours) )
2373 ,Sum of Squares,df,Mean Square,F,Sig.
2374 Regression,9572.30,1,9572.30,231.28,.000
2375 Residual,1158.90,28,41.39,,
2376 Total,10731.20,29,,,
2377
2378 Table: Coefficients (Mean time to repair (hours) )
2379 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.
2380 ,B,Std. Error,Beta,,
2381 (Constant),9.90,2.10,.00,4.71,.000
2382 Mean time between failures (months) ,3.01,.20,.94,15.21,.000
2383 ])
2384
2385 AT_CLEANUP
2386
2387
2388 AT_SETUP([LINEAR REGRESSION vif])
2389 AT_DATA([regression-vif.sps], [dnl
2390 SET FORMAT=F10.3.
2391
2392 data list notable  list /competence_x1 motivation_x2 performance_y.
2393 begin data
2394 32   34   36
2395 35   37   39
2396 38   45   49
2397 31   41   41
2398 36   40   38
2399 32   38   36
2400 33   39   37
2401 31   40   41
2402 30   37   40
2403 35   37   43
2404 31   34   36
2405 34   32   35
2406 31   42   34
2407 25   36   40
2408 35   42   40
2409 36   41   44
2410 30   38   32
2411 34   41   41
2412 34   41   44
2413 22   27   26
2414 27   26   33
2415 30   30   35
2416 30   35   37
2417 37   39   44
2418 29   35   36
2419 31   35   29
2420 31   45   41
2421 29   30   32
2422 29   35   36
2423 31   37   37
2424 36   45   42
2425 32   44   39
2426 27   26   31
2427 33   39   35
2428 20   25   28
2429 30   36   39
2430 27   37   39
2431 25   39   36
2432 32   38   38
2433 32   38   35
2434 end data.
2435
2436 regression /variables=competence_x1 motivation_x2
2437         /statistics=defaults tol
2438         /dependent=performance_y
2439         .
2440 ])
2441
2442
2443 AT_CHECK([pspp -O format=csv regression-vif.sps], [0], [dnl
2444 Table: Model Summary (performance_y)
2445 R,R Square,Adjusted R Square,Std. Error of the Estimate
2446 .785,.616,.595,2.980
2447
2448 Table: ANOVA (performance_y)
2449 ,Sum of Squares,df,Mean Square,F,Sig.
2450 Regression,526.494,2,263.247,29.641,.000
2451 Residual,328.606,37,8.881,,
2452 Total,855.100,39,,,
2453
2454 Table: Coefficients (performance_y)
2455 ,Unstandardized Coefficients,,Standardized Coefficients,t,Sig.,Collinearity Statistics,
2456 ,B,Std. Error,Beta,,,Tolerance,VIF
2457 (Constant),7.220,4.020,.000,1.796,.080,,
2458 competence_x1,.432,.166,.358,2.609,.013,.552,1.812
2459 motivation_x2,.453,.125,.499,3.636,.001,.552,1.812
2460 ])
2461
2462 AT_CLEANUP
2463
2464 AT_SETUP([REGRESSION syntax errors])
2465 AT_DATA([regression.sps], [dnl
2466 DATA LIST LIST NOTABLE /x y z.
2467 REGRESSION VARIABLES=**.
2468 REGRESSION METHOD=ENTER x/VARIABLES.
2469 REGRESSION DEPENDENT=x/VARIABLES.
2470 REGRESSION DEPENDENT=**.
2471 REGRESSION METHOD=**.
2472 REGRESSION METHOD=ENTER **.
2473 REGRESSION STATISTICS=**.
2474 REGRESSION STATISTICS=CI(**).
2475 REGRESSION STATISTICS=CI(1 **).
2476 REGRESSION SAVE=**.
2477 REGRESSION **.
2478 ])
2479 AT_CHECK([pspp -O format=csv regression.sps], [1], [dnl
2480 "regression.sps:2.22-2.23: error: REGRESSION: Syntax error expecting variable name.
2481     2 | REGRESSION VARIABLES=**.
2482       |                      ^~"
2483
2484 "regression.sps:3.27-3.35: error: REGRESSION: VARIABLES may not appear after METHOD.
2485     3 | REGRESSION METHOD=ENTER x/VARIABLES.
2486       |                           ^~~~~~~~~"
2487
2488 "regression.sps:4.24-4.32: error: REGRESSION: VARIABLES may not appear after DEPENDENT.
2489     4 | REGRESSION DEPENDENT=x/VARIABLES.
2490       |                        ^~~~~~~~~"
2491
2492 "regression.sps:5.22-5.23: error: REGRESSION: Syntax error expecting variable name.
2493     5 | REGRESSION DEPENDENT=**.
2494       |                      ^~"
2495
2496 "regression.sps:6.19-6.20: error: REGRESSION: Syntax error expecting ENTER.
2497     6 | REGRESSION METHOD=**.
2498       |                   ^~"
2499
2500 "regression.sps:7.25-7.26: error: REGRESSION: Syntax error expecting variable name.
2501     7 | REGRESSION METHOD=ENTER **.
2502       |                         ^~"
2503
2504 "regression.sps:8.23-8.24: error: REGRESSION: Syntax error expecting ALL, DEFAULTS, R, COEFF, ANOVA, BCOV, TOL, or CI.
2505     8 | REGRESSION STATISTICS=**.
2506       |                       ^~"
2507
2508 "regression.sps:9.26-9.27: error: REGRESSION: Syntax error expecting number.
2509     9 | REGRESSION STATISTICS=CI(**).
2510       |                          ^~"
2511
2512 "regression.sps:10.28-10.29: error: REGRESSION: Syntax error expecting `@:}@'.
2513    10 | REGRESSION STATISTICS=CI(1 **).
2514       |                            ^~"
2515
2516 "regression.sps:11.17-11.18: error: REGRESSION: Syntax error expecting PRED or RESID.
2517    11 | REGRESSION SAVE=**.
2518       |                 ^~"
2519
2520 "regression.sps:12.12-12.13: error: REGRESSION: Syntax error expecting VARIABLES, DEPENDENT, ORIGIN, NOORIGIN, METHOD, STATISTICS, or SAVE.
2521    12 | REGRESSION **.
2522       |            ^~"
2523 ])
2524 AT_CLEANUP