bug-gnu-pspp
[Top][All Lists]
Advanced

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

Re: PSPP-BUG: Fwd: COMPUTE IF


From: Ben Pfaff
Subject: Re: PSPP-BUG: Fwd: COMPUTE IF
Date: Sun, 27 Feb 2011 10:57:04 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

rushdale <address@hidden> writes:

> I want to create a variable Risk = 1 when variable X is >=10,000 IF variable
> Z is 1 or >=100,000 IF variable Z is 0
> Risk = 0 whe variable X is <10000 IF variable Z is 1 or <100,000 IF variable
> Z is 0

This should do the trick, I think:
        COMPUTE risk=(z = 1 AND x >= 10000) OR (z = 0 AND x >= 100000).
-- 
Ben Pfaff 
http://benpfaff.org



reply via email to

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