Date: Wed, 16 Feb 2005 14:50:20 -0500
Reply-To: Richard Ristow <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Richard Ristow <email@example.com>
Subject: Re: Syntax on Composite Knowledge
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 04:30 PM 2/15/2005, Muyiwa Oladosu wrote:
>I need [to summarize] composite knowledge on ways of transmitting
>There are nine questions in all. One asks whether respondents know any
>way of contracting HIV/AIDS. Those who answered yes to V1 were asked
>six questions each on correct ways of transmitting HIV/AIDS (V2 to V7)
>and two questions on
>incorrect ways (V8 and V9). Each question has three options-- 1=yes,
>2=no, 8=don't know
>I need help on how to combine these variables (V1 to V9) into one new
>variable categorised as follows;
>1. no knowledge
>2. know at least 3 ways, none incorrect
>3. know at least three ways including at least one incorrect
>4. know 4 or more ways, no incorrect
>5. know 4 ways or more, including at least one incorrect
This isn't what you asked, but: was it a good idea to have the two
incorrect ways at the end of the list? It might 'tip off' the
respondents if, say, they knew that V8 was incorrect, to suspect that
V9 might be, as well.
As for what you did ask: the transformation command COUNT is your
friend. I assume a way is 'known' if the respondent answered 1
concerning that way.
In your categorization,
- You don't provide for a respondent who knows something, but less than
- Categories 2 and 4, and 3 and 5, technically overlap: anyone who
knows "4 or more" knows "at least 3".
This is untested syntax, but:
NUMERIC N_CORR N_INCORR (F2).
N_CORR 'Number of correct ways known'
N_INCORR 'Number of incorrect ways known'.
COUNT N_CORR = V2 TO V7 (1).
COUNT N_INCORR = V8 V9 (1).
NUMERIC HIV_WAYS (F2).
VAR LABELS HIV_WAYS 'Ways known for transmitting HIV'.
VAL LABELS HIV_WAYS
1 'No knowledge'
2 '0-2 ways, no incorrect'
3 '1-2 ways, incl. incorrect'
4 '3 ways, no incorrect'
5 '3 ways, incl. incorrect'
6 '4+ ways, no incorrect'
7 '4+ ways, incl. incorrect'
9 'Missed category'
10 'LOGIC/MSG VALUE problem'.
COMPUTE HIV_WAYS = 10.
DO IF V1 NE 1.
. COMPUTE HIV_WAYS = 1.
ELSE IF (N_CORR + N_INCORR) LE 2.
. COMPUTE HIV_WAYS = 2.
. IF (N_INCORR > 1) HIV_WAYS = 3.
ELSE IF (N_CORR + N_INCORR) EQ 3.
. COMPUTE HIV_WAYS = 4.
. IF (N_INCORR > 1) HIV_WAYS = 5.
ELSE IF (N_CORR + N_INCORR) GE 4.
. COMPUTE HIV_WAYS = 6.
. IF (N_INCORR > 1) HIV_WAYS = 7.
. COMPUTE HIV_WAYS = 9.