Date: Mon, 18 Apr 2005 12:56:05 +0200
Reply-To: la volta statistics <schmidhauser@lavolta.ch>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: la volta statistics <schmidhauser@lavolta.ch>
Subject: AW: select cases
In-Reply-To: <200504180901.j3I91ssu019560@listserv.cc.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"
Hi Kim
provided that the 'measure-moments' are ordered the following syntax should
work:
DATA LIST LIST /id flu stress stresswk fluwk.
BEGIN DATA
1 1 0 1 1
2 1 1 2 2
3 1 0 3 3
4 0 1 4 4
END DATA.
If LAG(Stress) = 1 flag = 1.
exec.
Select if flu = 1 AND flag = 1 .
exec.
Hope this helps,
Christian
-----Ursprüngliche Nachricht-----
Von: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]Im Auftrag von
Kim Smolderen
Gesendet: Montag, 18. April 2005 11:02
An: SPSSX-L@LISTSERV.UGA.EDU
Betreff: select cases
Hi,
This is the data-format:
id flu stress stresswk fluwk
1 1 0 1 1
2 1 1 2 2
3 1 0 3 3
4 0 1 4 4
I want to select cases if:
flu=1 AND stress=1, but stress=1 has to be one measure-moment before flu=1.
So in the example above, only casenumber 3 has to be selected,
because 'stress' was present one measure-moment before the occurence
of 'flu'.
I would appreciate your help.
Kind Regards,
Kim Smolderen
Tilburg University