REGRESSION: Warn when REGRESSION with SAVE runs with a filter configured.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Jan 2016 06:28:12 +0000 (22:28 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 3 Jan 2016 06:28:12 +0000 (22:28 -0800)
Reported by elias tsolis.
Bug #46727.

src/language/stats/regression.c
tests/language/stats/regression.at

index d9409aae59bcc1301e16ed05770606457194915d..9379ce70ef5d1591ad3fa855edb49ef54a957ba6 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2005, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2009, 2010, 2011, 2012, 2013, 2014, 2016 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -376,6 +376,10 @@ cmd_regression (struct lexer *lexer, struct dataset *ds)
         msg (SW, _("REGRESSION with SAVE ignores TEMPORARY.  "
                    "Temporary transformations will be made permanent."));
 
+      if (dict_get_filter (dict))
+        msg (SW, _("REGRESSION with SAVE ignores FILTER.  "
+                   "All cases will be processed."));
+
       workspace.writer = autopaging_writer_create (proto);
       caseproto_unref (proto);
     }
index 7548160079b2e14d195c16dbe841dd55759fdcdf..c48dfaf7847dbed1ddd5de2ea76094ec6db22b23 100644 (file)
@@ -4,6 +4,7 @@ AT_SETUP([LINEAR REGRESSION - basic])
 AT_DATA([regression.sps], [dnl
 set format = F22.3.
 data list notable list / v0 to v2.
+filter by v0.
 begin data
  0.65377128  7.735648 -23.97588
 -0.13087553  6.142625 -19.63854
@@ -21,6 +22,8 @@ list.
 ])
 
 AT_CHECK([pspp -O format=csv regression.sps], [0], [dnl
+regression.sps:16: warning: REGRESSION: REGRESSION with SAVE ignores FILTER.  All cases will be processed.
+
 Table: Model Summary (v2)
 ,R,R Square,Adjusted R Square,Std. Error of the Estimate
 ,.971,.942,.925,1.337