« Return to Thread: Question about Frequency Output

Re: Question about selecting subsamples

by Arthur Burke :: Rate this Message:

Reply to Author | View in Thread

Some parts of this message have been removed. Learn more about Nabble's security policy.
Stace ... Does this do what you want? 
 
* GROUP = 1  Any individual who answered YES to the first accident inquiry (question #1).
* GROUP = 2  Anyone who answered NO to question 1 but YES to question 6 (another accident inquiry question).
* GROUP = 3  Anyone who answered NO to question 1&6, but answered YES to question 15.
* GROUP = 4  Anyone who answered no to questions 1,6,&15 but answered YES to question 28.
 
DATA LIST FREE /Q1 Q6 Q15 Q28.
BEGIN DATA.
0 0 0 0
1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1
END DATA.
 
COMPUTE GROUP = 0.
IF Q1 = 1 GROUP = 1.
IF Q1 = 0 and Q6 = 1 GROUP = 2.
IF Q1 = 0 AND Q6 = 0 AND Q15 = 1 GROUP = 3.
IF Q1 = 0 AND Q6 = 0 AND Q15=0 AND Q28 = 1 GROUP = 4.
EXECUTE.
______________________________________________
 
Art

------------------------------------------------------------------

Art Burke
Northwest Regional Educational Laboratory
101 SW Main St, Suite 500
Portland, OR 97204-3213

Phone:  503-275-9592 / 800-547-6339

Fax: 503-275-0450

burkea@... 

 


 



From: stace swayne [mailto:jladyl@...]
Sent: Monday, June 29, 2009 6:35 AM
To: SPSSX-L@...
Subject: Question about selecting subsamples

Dear list,
 

I have to create sub-samples from a larger data set and I have a few questions:

 

Here is the back ground:

 

I have a data set with 252 people, I have been asked to create sub-samples from this data set based on the following conditions and combine them together to reflect anyone in the sample who reported having an accident :

 

(1) Any individual who answered YES to the first accident inquiry (question #1)

(2) Anyone who answered NO to question 1 but YES to question 6 (another accident inquiry question)

(3) Anyone who answered NO to question 1&6, but answered YES to question 15 (another accident inquiry question)

(4) Anyone who answered no to questions 1,6,&15 but answered YES to question 28.

 

My question is: how would I go about writing the syntax to select based on these conditions.

 

All suggestions are appreciated,

 

Thanks,

 

Stace

 

 « Return to Thread: Question about Frequency Output