Date: Mon, 25 Jun 2007 11:23:47 -0300
Reply-To: Hector Maletta <hmaletta@fibertel.com.ar>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Hector Maletta <hmaletta@fibertel.com.ar>
Subject: Re: Help with COMPUTE
In-Reply-To: <467FCC5A.6070408@gmail.com>
Content-Type: text/plain; charset="us-ascii"
Nicola,
One simple way is to recode the missing values as zeroes and then
apply your formula:
RECODE q1a q1b q1c (SYSMIS=0).
COMPUTE newvar = q1a + (q1b * 2) + (q1b * 3).
Hector
-----Original Message-----
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of N
Knight
Sent: 25 June 2007 11:08
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Help with COMPUTE
I have set up an online questionnaire where to answer some of the
(categorical) questions participants have to select one (and only
one)
of three possible responses. For some reason, the online survey
software
I'm using is coding responses into three separate dichotomous
variables
-- so, the raw data looks something like the following:
q1a q1b q1c
1 . .
. . 1
. 1 .
. . 1
. . 1
. . 1
1 . .
. . 1
. . 1
1 . .
1 . .
. 1 .
. 1 .
where the dots represent missing data. I've been trying to use
COMPUTE
to create a new variable with the formula [q1a + (q1b * 2) + (q1b *
3)],
in order to obtain a single quantitative variable with values
1,2,3.
This doesn't work, as far as I understand because of the missing
values.
I'm at wit's end, and would appreciate any help on this as the
database
is quite large and I really don't want to end up doing this by
hand!
All the best,
Nicola Knight
|