pspp-users
[Top][All Lists]
Advanced

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

Re: Data transformation in the Mac environment


From: ftr
Subject: Re: Data transformation in the Mac environment
Date: Fri, 07 Mar 2014 16:00:50 +0100
User-agent: Mozilla/5.0 (Windows NT 6.0; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 07/03/2014 08:05, John Darrington wrote:
On Thu, Mar 06, 2014 at 09:19:09PM -0500, Mark Levine wrote:

      I have had no problem with individual variable recoding. I would, 
however, like to do a variable transformation of the form (If VARX = 1 and VARY 
=1, then let NEWVAR = 1), i.e. a simple boolean expression.


There are a number of ways this could be achived (for example you could use
RECODE ... INTO ) but in my opinion, the simplest way is:

COMPUTE newvar = (VARX = 1) AND (VARY=1).

I would have done this with with several
If (var1 = 1 and var2 =1) newvar = 1.
if (var1 = 1 and var2 =2) newvar = 2.
etc.

So I learned I guess an old trick, but I did not know it.

Thanks

ftr



reply via email to

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