pspp-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RECODE, CHISQ issues, and other feedback


From: seth
Subject: Re: RECODE, CHISQ issues, and other feedback
Date: Mon, 16 Apr 2007 01:41:48 -0700
User-agent: Mutt/1.5.9i

On Sun, Apr 15, 2007 at 09:29:38PM -0600, Ben Pfaff wrote:
> address@hidden writes:
> 
> > Her professor gives her data files in SPSS format, which I've been able 
> > to load with pspp, but one of the datasets has a string format column, 
> > which I need to make numeric.  I've done a recode in both the psppire 
> > gui and by cli with RECODE (CONVERT) and it's just setting the value to 
> > zero for everything.  RECODE is also missing all the THRU src constructs 
> > for the recode mapping.  CONVERT doesn't seem to be "useful" at the 
> > moment.  What worked for me was to do ('   1'=1) etc. maps, for all 
> > values that were strings that needed to be cast to NUMERIC.
> 
> I tried to take a look at the tests for RECODE to how we were
> testing CONVERT, only to find that there weren't any decent tests
> for RECODE at all.  So I wrote some, which found a number of
> bugs, and fixed the bugs.  The fixes are checked into the PSPP
> CVS.  (If you find it inconvenient to use the PSPP CVS tree, I
> can make a snapshot available too.)

Thanks, I'll take a look at the cvs update, but in the morning.

> 
> > I REALLY don't think people should have to pay the gobs of money they 
> > charge for SPSS, so if you guys need any coding to fill in the gaps, let 
> > me know.  I'll probably be submitting some patches, at least to fix up 
> > RECODE to at least match the manual's claims for what it does.
> 
> I think I fixed it up to match SPSS now.

Thanks.

> 
> > I looked at the source code to figure out why THRU wasn't
> > working (being unimplemented), so I'm already in the code.  
> 
> THRU should work.  It did in my tests, even before the bug
> fixes.  Can you show me an example that doesn't work, but should?

I figured out the problem was that I hadn't recoded a string into 
NUMERIC.  It's working fine when I do that.  The error message didn't 
make it obvious.  It just said there was a syntax error.  After the 
first few tries, I realized how to tell the difference between when the 
input is encoded badly as a string versus coded correctly as a numeric, 
but not until after I sent the email.  (psppire turns out to be really 
good for this.)  I guess my wife's professor wants people to learn how 
to recode in the SPSS gui as part of the assignment.

With a working CONVERT mapping, THRU should be working fine on string 
(but really numeric) input (as long as it's "RECODE ... (CONVERT) ..."'d 
first.

> 
> > I might work on THRU, CONVERT, and single-factor chi-square is
> > broken, even though passing multiple factors into it seems to
> > work.  CROSSTABS /CELLS=... doesn't do what I expect, either.
> 
> CROSSTABS kind of sucks in some ways, yes, but I don't think I
> know about this particular problem.  Can you give more details?

Yes, I've made an example pspp file.  I'll file a concise bug in the 
morning, but if you want an early look at what I'm working on, you can 
see this, which I update as I get and incorporate feedback and updates:

http://swoolley.homeip.net/pspp/

> 
> [...]
> 
> > Oh, and maybe you guys can hang out in the #pspp channel on freenode 
> > where it says you are but nobody actually idles?
> 
> I don't really do IRC.  I think John D is the main guy who hangs
> out in #pspp.  But he's in Australia so his hours may be a little
> surprising from a North American viewpoint.

Yeah, I've seen John in there now.  I should probably subscribe to the 
-dev list, and move the discussion over there.

thanks again,

Seth

> -- 
> "There's only one thing that will make them stop hating you.
>  And that's being so good at what you do that they can't ignore you.
>  I told them you were the best.  Now you damn well better be."
> --Orson Scott Card, _Ender's Game_




reply via email to

[Prev in Thread] Current Thread [Next in Thread]