How can I combine three yes/no questions into one?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How can I combine three yes/no questions into one?

bipbop
This post has NOT been accepted by the mailing list yet.
Please keep in mind I know little of stats and how to use SPSS. I would really appreciate some help.

I have several questions that ask about liking fruit.
for example: q1=do you like apples?, q2=do you like pears?, q3=do you like oranges?
Each is a yes/no question and 0=no 1=yes

I want to combine q1-q3 into a new variable so I can simply find out the percentage of people that say yes and and that say no to simply "liking fruit"

Is this possible? How can I do this using SPSS's menu options? Serious thanks to anyone that can help me.
Reply | Threaded
Open this post in threaded view
|

Re: How can I combine three yes/no questions into one?

Art Kendall
there might be substantive reasons to ask how many of these are liked, as well as if ANY are liked.data list list /Id (F3) apple pear orange (3f1).
begin data
1 0 0 1
2 0 1 0
3 1 0 0
4 1 0 1
5 1 1 0
6 1 1 1
7 0 1 1
8 0 0 0
end data.
numeric  N_fruit1,  N_fruit2, Any_fruit (f1).
value labels apple pear orange 1 'yes' 0 'no'.
count N_fruit1 = apple pear orange(1).
compute N_fruit2 = sum(apple, pear, orange).
compute Any_fruit = any(1, apple, pear, orange).
list.

Art Kendall
Social Research Consultants
Reply | Threaded
Open this post in threaded view
|

Re: How can I combine three yes/no questions into one?

John F Hall
Try:

compute like = 0.
count like = q1, q2, q3 (1).
recode like (2,3=1).
format like (f1.0).
freq like.


What will you do if 100% like fruit?


-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Art
Kendall
Sent: 19 May 2017 18:02
To: [hidden email]
Subject: Re: How can I combine three yes/no questions into one?

there might be substantive reasons to ask how many of these are liked, as
well as if ANY are liked.data list list /Id (F3) apple pear orange (3f1).
begin data
1 0 0 1
2 0 1 0
3 1 0 0
4 1 0 1
5 1 1 0
6 1 1 1
7 0 1 1
8 0 0 0
end data.
numeric  N_fruit1,  N_fruit2, Any_fruit (f1).
value labels apple pear orange 1 'yes' 0 'no'.
count N_fruit1 = apple pear orange(1).
compute N_fruit2 = sum(apple, pear, orange).
compute Any_fruit = any(1, apple, pear, orange).
list.





-----
Art Kendall
Social Research Consultants
--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/How-can-I-combine-three-yes-no
-questions-into-one-tp5734209p5734210.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command SIGNOFF SPSSX-L For a list of
commands to manage subscriptions, send the command INFO REFCARD

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD