Login  Register

Re: altering a variable in SPSS

Posted by David Marso on Oct 15, 2013; 7:55pm
URL: http://spssx-discussion.165.s1.nabble.com/altering-a-variable-in-SPSS-tp5722563p5722567.html

If they are numeric then multiply the first by a power of 10 and add them.

Rick Oliver wrote
yes and yes

Assuming IDs are strings:

string newID (a50). /*or whatever length is necessary.
compute newID=concat(rtrim(idvar1), (idvar2)).
sort cases by var1 var2.

Rick Oliver
Senior Information Developer
IBM Business Analytics (SPSS)
E-mail: [hidden email]



From:   stace swayne <[hidden email]>
To:     [hidden email],
Date:   10/15/2013 01:38 PM
Subject:        altering a variable in SPSS
Sent by:        "SPSSX(r) Discussion" <[hidden email]>



Dear Listserv,

I have two questions regarding data manipulation

The first question is: Is it possible to concatenate variables in SPSS:
for example I have a household ID and a person ID and I would like to
combine them together.

The second question is: Is it possible to sort on two variables
simultaneously: for example sorting on household ID and person ID at the
same time.


All suggestions are welcomed.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"