Ben Pfaff [Fri, 4 Sep 2009 03:09:36 +0000 (20:09 -0700)]
T-TEST: Avoid NaN in paired-sample correlation significance calcuation.
Sometimes the correlation comes out just above 1.0 due to inaccuracy of
machine calculation, which causes sqrt(1-corr**2) to yield NaN. This
commit forces the correlation into the valid range, fixing the problem.
Thanks to Matej Cepl <mcepl@redhat.com> for reporting the problem.
Thanks to John Darrington for suggesting the fix.
Jason Stover [Fri, 17 Jul 2009 20:02:02 +0000 (16:02 -0400)]
pspp_linreg(): Use cache->n_coeffs to set the dimensions of sw, instead of
cache->n_indeps, which may give incorrect dimension in the case
of categorical variables. Fixes bug referenced in bug report
26861.
John Darrington [Wed, 15 Jul 2009 18:25:42 +0000 (02:25 +0800)]
Fixed bug reporting the significance of paired value t-test.
Due to a cut and paste error, the significance of paired
t-tests was wrong when the value of T was positive.
Thanks to Mike Griffiths for reporting this problem.
John Darrington [Wed, 15 Jul 2009 18:25:42 +0000 (02:25 +0800)]
Fixed bug reporting the significance of paired value t-test.
Due to a cut and paste error, the significance of paired
t-tests was wrong when the value of T was positive.
Thanks to Mike Griffiths for reporting this problem.
Ben Pfaff [Thu, 2 Jul 2009 03:50:33 +0000 (20:50 -0700)]
chart: Fix format string issues in chart_write_title callers.
The 'title' argument to chart_write_title is used as a printf-type format
string, so callers must pass "%s" to safely use an arbitrary string as a
title.
Ben Pfaff [Thu, 18 Jun 2009 04:24:38 +0000 (21:24 -0700)]
sys-file-reader: Don't warn if compression bias field is 0.
Some software writes a value of 0 to the compression bias field. We
expect that this field has a value of 100 and warn if we see any other
value, but there is no real need to do so (because it is very likely
that we can read the file correctly in any case). So suppress the
warning if we see a value of 0 here, because it bothers users.
Thanks to Tony Reardon <tony@sir.com.au> for reporting this
unnecessary warning.
Ben Pfaff [Thu, 18 Jun 2009 04:11:10 +0000 (21:11 -0700)]
por-file-reader: Tolerate short lines when detecting portable files.
When the portable file reader reads a file, it assumes that a line
shorter than 80 bytes should actually be padded out on the right with
spaces, because this is a fairly common problem in practice, perhaps
due to text editors or other software that drops spaces at the end of
a line.
However, pfm_detect, the function that is supposed to detect whether
a given file is an SPSS portable file, did not apply this heuristic to
the data that it read at the beginning of the file, and thus files in
which the first few lines were truncated this way were not detected
properly as portable files.
This commit fixes the problem by making pfm_detect a little bit
smarter. It would probably be better to actually unify the
file-reading logic, instead of implementing it in two separate places,
but this appears to work adequately too.
Thanks to Tony Reardon <tony@sir.com.au> for reporting the problem
and supplying a file that demonstrated it.
Ben Pfaff [Tue, 12 May 2009 03:56:39 +0000 (20:56 -0700)]
data-parser: Treat " ," the same as ",".
The data parser (used e.g. by DATA LIST) was unintentionally treating
soft separators (e.g. white space) followed by a hard separator (e.g.
a comma) as an empty field, but in fact it should be treated as just a
single separator. This fixes it and adds a test.
Thanks to pascal barbedor <pbarbedor@gmail.com> for reporting the problem.
John Darrington [Tue, 7 Apr 2009 02:30:13 +0000 (10:30 +0800)]
Allow users to set the precision of output statistics.
Instead of hard coding the width and decimals of output
numbers, respect the default format in most instances.
Counts are normally displayed with the format of the weight
variable, if any. Closes patch #6785
John Darrington [Sun, 8 Mar 2009 01:47:48 +0000 (10:47 +0900)]
Fixed a bug reading empty strings from Postgres databases.
Fixed a bug in the Postgresql import feature, where a segfault
would occur when a reading a database which contained string
fields with only null, or zero length values.
John Darrington [Thu, 5 Feb 2009 23:01:22 +0000 (08:01 +0900)]
Silently ignore some inrecognised subtypes.
When reading system files, record subtypes of which the developers are
aware but which pspp doesn't yet support are silently ignored. Subtypes
which the developers are unaware provoke a message requesting the user
to send us a sample.
John Darrington [Wed, 12 Nov 2008 01:15:16 +0000 (10:15 +0900)]
Added a set of per binary LDFLAGS parameters.
Added two optional variables PSPP_LDFLAGS and PSPPIRE_LDFLAGS for the convenience of package creators who need to be able to pass flags to one program but not the other.
John Darrington [Sat, 18 Oct 2008 02:50:52 +0000 (10:50 +0800)]
Marked CORRELATIONS and PEARSON CORRELATIONS as unimplemented.
These commands were defined in command.def, but only the parser
was actually implemented; they didn't actually do anything.
Marking them as unimplemented until they're finished.
Ben Pfaff [Sun, 5 Oct 2008 18:17:10 +0000 (11:17 -0700)]
Use Gnulib module "regex", to fix linking on Mingw.
The GUI code uses POSIX regular expressions, which Mingw has in a separate
library (-lregex). We could just search for that library, but by including
our own implementation (via Gnulib) we also work around known bugs in
system regular expression implementations.
Ben Pfaff [Sat, 4 Oct 2008 04:01:50 +0000 (21:01 -0700)]
Also warn about missing prerequisites as we encounter them (bug #24445).
It can happen that configure bails out in the middle due to some issue
that PSPP cannot directly control; for example, AC_CHECK_SIZEOF exits
unconditionally if it fails. If this happens then, before, we would fail
to warn about missing required prerequisites that could well have been
the actual cause of the failure, because we only warn about these at
the end of the run.
Now, we warn about missing prerequisites both at time of detection and
in a summary at the end, to head off this problem.
Thanks to Jim Orr for allowing me to notice the problem.
Ben Pfaff [Sat, 4 Oct 2008 04:00:55 +0000 (21:00 -0700)]
Add note to INSTALL explaining how to use libraries from /usr/local.
Several users have had trouble building PSPP with self-built GSL, etc.
that were installed to /usr/local. Explain how to do it here to be
more friendly to Unix novices.
Thanks to Jim Orr for making me realize that this was important.
John Darrington [Sat, 23 Aug 2008 00:44:32 +0000 (08:44 +0800)]
Work around bug #24033 (appending to output in cygwin).
Cygwin (and perhaps other w32 platforms) cannot write to a file
whilst it is open for reading. This kludge therefore closes the
output after pasting into the output viewer and re-opens when new
data is appended. It'll be slow if the output file becomes large.
Ben Pfaff [Sun, 27 Jul 2008 18:12:45 +0000 (11:12 -0700)]
Use standard C99 isfinite, isnan, isinf in place of GSL substitutes.
In change a9afcdd22, "Use gsl_isnan instead of isnan, ...," isfinite,
isnan, and isinf were changed to use the GSL substitutes because of
lack of portability of the C99 versions. Now, gnulib has portable
versions of all of these, so change them back.
This commit changes calls to gsl_finite() to call isfinite() instead
of the equivalent finite(). isfinite() is correct here: both gsl_finite()
and finite() return true for NaNs, which is a surprising result given
that a NaN is definitely not finite, but isfinite() returns false and,
more importantly, behaves as actually wanted in each place it is used
in PSPP code.
This commit requires upgrading gnulib to at least change 5183a0e3c,
"Add missing dependencies on new m4/exponent[fdl].m4 files," or later,
and re-running "make -f Smake".
Jason Stover [Sun, 22 Jun 2008 02:44:27 +0000 (22:44 -0400)]
Fixed bug 23567. Added accessor functions to get/set means and standard deviations for variables associated with struct coeffs. Fixed corresponding values in tests.