Tips & Tricks #29 – automatic recode of many variables

 In Tips & Tricks

If you have a lot of similar string variables that you would like to convert to numeric, then you should be aware of the smart recoding for all at the same time.

Let’s start with this example, “Which country did you visit in October, November and December?”

I would like to convert all the 3 string variables to numeric format, with number codes and value labels.

As you already might know, the command “Transform – automatic recode” will help you with this:

But if you then just click OK, following will happen:

As you see the numeric code 1 is “Cyprus” in the first variable, but “Austria” in the second variable and so on. Not so smart when you want to analyze these variable with multiple response for example.

So this is what you have to choose, to avoid this mistake:

And the result will be following:

Now all 3 variables got exactly the same codes and value labels for all 15 countries that appears.

And if I turn off the value labels:

Thanks for the visit!

Gunilla

 

 

error: Content is protected !!