merging 4 variables into one

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

godfather
Posts: 73
Joined: Tue Oct 21, 2008 8:34 pm

merging 4 variables into one

Postby godfather » Sat Feb 07, 2009 4:10 am

I have four variables ext, int, co-occur, no problem and that are all categorical with subjects in the ext variable being labeled 1 if they meet the criteria and 0 if not, for int the number is 2, co-occur it’s 3 and no problem its 4. 0 if not meet criteria. I would like to merge these four variables into one NEW variable so that the NEW variable has four categories:
ext: value 1
Int: value 2
co-occur: value 3
no problem: value 4

How can I do this?
Fierce
Moderator
Posts: 391
Joined: Sun Dec 28, 2008 5:55 pm
Location: Belo Horizonte, Brasil

Postby Fierce » Sun Feb 08, 2009 1:20 am

Posting Guidelines

By your post, is seems that you have 4 variables; the first have values of 1 and 0, but the others have a single values for all cases (2, 3 and 4)... And it doesn't feel right.
Also, it ain't clear if you want to create a new variable BASED on the 4 original ones or just put all cases together in a single variable.

Probably it can be done restructuring data or computing varibales...
godfather
Posts: 73
Joined: Tue Oct 21, 2008 8:34 pm

Postby godfather » Sun Feb 08, 2009 1:39 am

Sorry, all the other variables also have 0,2;0,3;0,4. what I would like to do is put all these case in a single variable but maintaining the unique values from each of the groups.
new variable name: Problems
So it would look something like this in my data editor:

"Problems"
1
1
4
3
2
2
1
1
where each of the numbers would corresponds to
ext: value 1
Int: value 2
co-occur: value 3
no problem: value 4
to clarify further I will use an hypothetical example: If I had chosen to classify sex using two diffrent variables in teh data editor,males and females,
with males=1 and females=2. what I am trying to do is the same as wanting to combine males and females into one variable Gender but keeping the distinct value for males and females. Hope that makes more sense.

Who is online

Users browsing this forum: No registered users and 1 guest

cron