I am trying to create a new variable out of 4 variables. Ok, so basically in the raw data I have for variables for tool used to do some work. Each of these 4 variables has a code of 1.

I want to unify these four variables in one variable with 4 different categories, one for each of the tool.

This is the command that I type in but, dunno for what reasons, it does not work.

generate equip = .

replace equip = 1 if measur_tape == 1

replace equip = 2 if measur_pole == 1

replace equip = 3 if measur_sheet == 1

replace equip = a if calc ==1

So I assume I now have 1 var with 4 different categories. However, if I tab equip this I get only oneway table with one single category!

What about all the other 3 categories?? What I am missing ??

Thanks a lot !!!