Date: Tue, 25 Mar 2008 14:52:18 -0500
Reply-To: Mary <email@example.com>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary <mlhoward@AVALON.NET>
Subject: Re: combining different variables into one
Content-Type: text/plain; charset="iso-8859-1"
This is the SAS newsgroup. Did you mean to say SAS rather than SPSS?
If so, you could probably do a simple IF statement, such as:
informat education 4.;
if EDU8=1 then education=8;
else if EDU7=1 then education=7;
else if EDU6=1 then education=6;
else if EDU5=1 then education=5;
else if EDU4=1 then education=4;
else if EDU3=1 then education=3;
else if EDU2=1 then education=2;
else if EDU1=1 then education=1;
Note that I started with the highest education and worked backward.
----- Original Message -----
Sent: Tuesday, March 25, 2008 2:34 PM
Subject: combining different variables into one
I am new to SPSS syntax and I've searched for the answer to my
question in the manual but I can't seem to find the solution to my
problem. If it is there I apologize.
I am performing a secondary analysis on a database I did not create
and I wish to collapse eight variables into three. The eight variables
represent different levels of education, so in EDU 1 through to EDU8,
if a person attained that level of education there is a 1, otherwise
there is a missing variable. It looks something like this:
EDU1 EDU2 EDU3 EDU4 EDU5 EDU6 EDU7 EDU8
...and so on for about 400 cases. I wish to collapse EDU 1 & 3
2, 4, 5 & 7 together, and 6 & 8 together. What should I do?
Thanks in advance,