Reverse autorecode syntax

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

Reverse autorecode syntax

Max Bell-2
Dear List,

I'm loooking for syntax to do reverse autorecode. I want to create a new
string variable based on the values of an existing variable. I found
this script
Reverse autorecode.SBS <Scripts/Labels/ReverseAutorecode.txt>  To create
a new string variable containing the value labels of an existing
variable (this can also be done using syntax alone)

But the mentioned syntax I cannot find. Who can help me?


Thanks in advance,
Max
Reply | Threaded
Open this post in threaded view
|

Re:Reverse autorecode syntax

Jerabek Jindrich
Hello Max,

You can turn numeric variable into string / or string to num with the Autorecode command.
Menu/Transform/Autorecode ...

The syntax is
AUTORECODE
  VARIABLES=var00001  /INTO NewVar
  /DESCENDING /*optional, Descending reverse the value order - highest value coded as the lowest   */.

HTH
Jindra

> ------------ Původní zpráva ------------
> Od: Max Bell <[hidden email]>
> Předmět: Reverse autorecode syntax
> Datum: 05.3.2007 13:11:10
> ----------------------------------------
> Dear List,
>
> I'm loooking for syntax to do reverse autorecode. I want to create a new
> string variable based on the values of an existing variable. I found
> this script
> Reverse autorecode.SBS <Scripts/Labels/ReverseAutorecode.txt>  To create
> a new string variable containing the value labels of an existing
> variable (this can also be done using syntax alone)
>
> But the mentioned syntax I cannot find. Who can help me?
>
>
> Thanks in advance,
> Max
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Reverse autorecode syntax

Richard Ristow
In reply to this post by Max Bell-2
At 07:06 AM 3/5/2007, Max Bell wrote:

>I'm loooking for syntax to do reverse autorecode. I want to create a
>new
>string variable based on the values of an existing variable. I found
>this script
>Reverse autorecode.SBS <Scripts/Labels/ReverseAutorecode.txt>  To
>create a new string variable containing the value labels of an
>existing variable (this can also be done using syntax alone)

In SPSS 14 and 15, there's the VALUELABEL function to do exactly what
you want. Does this do it, or are you running an earlier release?