John Darrington [Tue, 5 Jul 2011 17:45:31 +0000 (19:45 +0200)]
Categoricals to take interactions instead of variables.
This change alters the API of categoricals_create, so as to
accept an array of interactions instead of an array of variables.
Currently, however only interactions which contain exactly one
variable will run correctly.
Ben Pfaff [Mon, 4 Jul 2011 21:47:35 +0000 (14:47 -0700)]
format: Use max width for over-max decimals in fmt_fix().
In fmt_fix(), requesting more decimals than are possible did
not increase the width at all. It makes better sense to use
the maximum width and maximum decimals for this case, so this
commit makes that change.
Ben Pfaff [Wed, 13 Jul 2011 05:06:37 +0000 (22:06 -0700)]
GLM: Allow +/- .001 for Corrected Total Type III Sum of Squares.
Jeremy Lavergne <jeremy@lavergne.gotdns.org> reported that on
Mac OS X this value is calculated as 329.628 instead of
329.627. John Darrington said that he's seen the same on
GNU/Linux depending on compiler optimization flags.
Ben Pfaff [Sun, 10 Jul 2011 22:51:13 +0000 (15:51 -0700)]
tests: Avoid nonportable "mktemp" usage.
Jeremy Lavergne <jeremy@lavergne.gotdns.org> reported that
mktemp on Mac OS X does not have a -p option. But I don't see
a reason to use mktemp at all here, so this commit uses a fixed
name instead.
John Darrington [Fri, 1 Jul 2011 18:04:58 +0000 (20:04 +0200)]
Implemented the POSTHOC subcommand for the ONEWAY command.
Currently, only LSD, Tukey, Bonferroni, Scheffe, Games-Howell
and Sidak are supported. These are presented as Multiple
Comparisons - the Homogeneous Subsets are not yet implemented.
John Darrington [Fri, 1 Jul 2011 16:39:10 +0000 (18:39 +0200)]
New widget PsppireValChooser.
This widget provides a user interface allowing the user to input the
a value, or range of values. This was previously done "by hand" in
the recode dialog, but was awkward to maintain, and clumsy. Upcoming
dialogs will need something very similar. So now seemed like a good
time to encapsulate it.
John Darrington [Fri, 1 Jul 2011 16:20:42 +0000 (18:20 +0200)]
Fix bugs deleting temporary files and their containing directory.
The clean_temp module provided by gnulib doesn't cleanup on program
exit. We must do that ourselves. Secondly, the close_temp_file function
was supposed to remove the file, but didn't do that. Thirdly, files
were not being registered with the clean_temp module on creation.
This change fixes these problems.
John Darrington [Fri, 1 Jul 2011 16:18:27 +0000 (18:18 +0200)]
Change the order of the reported NPAR values in two sample related tests.
This change makes the order of the reported values follow the order in
which they were entered in the syntax. The changes to the tests affect
only the order. The numbers are unchanged.
John Darrington [Fri, 1 Jul 2011 14:47:33 +0000 (16:47 +0200)]
Re-implemented the T-TEST command and the levene calculation.
Also updated the ONEWAY command to use the new levene test.
The changes to t-test.at in this changeset affect only whitespace
or the order of reported significance. The numbers remain unchanged.
John Darrington [Mon, 27 Jun 2011 07:13:11 +0000 (09:13 +0200)]
GLM: Add unimplemented subcommands, and add a test.
This change adds a basic GLM test for the "Latin Square" use case.
It also implements the more common subcommands that might occur in
a real life example of such usage. The /DESIGN subcommand differs
slightly from spss. In spss, it is optional, and if given can be
empty. In this change, /DESIGN is mandatory and may not be empty.
The rational for that, is that spss's default is to include interactions
for all the factors. We don't (yet) support interactions, so it's
better to refuse to run a syntax which relies upon the default
rather than to run it with different semantics.
Ben Pfaff [Sat, 11 Jun 2011 17:40:43 +0000 (10:40 -0700)]
gui: Eliminate some dependencies on the dictionary.
Previously all of the dialog boxes used by the variable sheet
kept around a pointer to the dictionary solely to obtain the
dictionary's encoding. Previous commits have eliminated that
use, so this commit gets rid of the dictionary members.
Ben Pfaff [Tue, 21 Jun 2011 02:06:11 +0000 (19:06 -0700)]
gui: Simplify value_to_text() parameters.
Both the format and the dictionary can be inferred from the
variable being formatted in every case in the tree but one, so
use that as the calling convention. In the one remaining case,
it's just as easy to call data_out() directly.
Ben Pfaff [Thu, 23 Jun 2011 05:13:40 +0000 (22:13 -0700)]
sys-file-reader: Reduce invalid format from error to warning.
gaby jongenelen <geebie21@gmail.com> provided a .sav file
written by "MS Windows Release 13.0 spssio32.dll" that had
zeros in the "write" format field for several numeric
variables. Until now, PSPP treated this as an error and
rejected the file. This commit changes the error to a warning
and suppresses the diagnostic entirely for this case of a
zero value.
Ben Pfaff [Sat, 18 Jun 2011 05:21:38 +0000 (22:21 -0700)]
sys-file-writer: Write identical sets of value labels only once.
The .sav file format can save space by writing a single set of
value labels once and assigning it to multiple variables. PSPP
has never taken advantage of this, instead writing the value
labels for each variable separately. This commit adopts the
strategy for avoiding duplicates apparently used by SPSS, based
on observing a .sav file that had many groups of variables with
the same labels.
Thanks to Curt Reinhold <Curt.Reinhold@psychonomics.de> for
providing the .sav file that led to this discovery.
Ben Pfaff [Sat, 18 Jun 2011 05:18:27 +0000 (22:18 -0700)]
variable: Do not trim trailing whitespace from variable labels.
Until now, PSPP has trimmed trailing whitespace from variable
labels. SPSS does not do this, which led to gratuitous changes
in variable labels when reading and then writing back a .sav
file, so this commit stops stripping trailing whitespace from
variable labels.
Thanks to Curt Reinhold <Curt.Reinhold@psychonomics.de> for
providing the .sav file that led to this discovery.
Ben Pfaff [Sat, 18 Jun 2011 05:16:44 +0000 (22:16 -0700)]
sys-file-writer: Omit empty multiple response sets records.
Multiple response sets are divided into two records in a .sav
file: one record with subtype 7 and one with subtype 19. PSPP
was incorrectly writing both records even if one of them was
empty. This commit makes it omit the empty record.
Thanks to Curt Reinhold <Curt.Reinhold@psychonomics.de> for
providing the .sav file that led to this discovery.
Ben Pfaff [Thu, 16 Jun 2011 06:13:12 +0000 (23:13 -0700)]
sys-file-reader, sys-file-writer: Use codepage numbers.
PSPP has had a library for converting between encoding names
and codepage numbers for a while, but the system file reader
and writer code has not taken advantage of it. This commit
make them use it.
Ben Pfaff [Thu, 16 Jun 2011 06:08:13 +0000 (23:08 -0700)]
Update code that assumed a dictionary's encoding could be NULL.
Until recently, I think, it was possible for dict_get_encoding()
to return NULL. It is no longer possible as far as I can see,
so this commit adds a comment that says so to the definition
of dict_get_encoding(). It also updates a few callers that
had checks for null pointers.
Ben Pfaff [Thu, 16 Jun 2011 01:55:54 +0000 (18:55 -0700)]
sys-file-writer: Put long variable name in variable attributes.
Otherwise, PSPP cannot read back .sav files that it writes, if
they contain variable attributes for variables with long names.
Thanks to Curt Reinhold <Curt.Reinhold@psychonomics.de> for
providing the .sav file that led to this discovery and to John
Darrington for helping to investigate.