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
_______________________________________________
Pspp-users mailing list
Pspp-users@gnu.org
https://lists.gnu.org/mailman/listinfo/pspp-users