SPSS program : Restructure or looping

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

SPSS program : Restructure or looping

Rajeshms
Hi All,

I have the following query

Person ID     Code1    Code2    Code3
1                       123
1                        123
1                         122
2                          125
2                         125
3                            123
3                           122
3                           121
3                             120
4                               111
4                              121
5                             100

similarly I have several other codes in code2 and code3.

Now  I need to calculate like this below

Person Id    unique codes : code1_1 Code1_2 ....etc code2_1 code2_2...etc  code3_1  code3_2
1
2
3
4
5

So how is this possible to get in SPSS. I just need to calculate unique codes of each person id in each codes.

Thanks a lot.
--
Regards,

SPSS




Reply | Threaded
Open this post in threaded view
|

Re: SPSS program : Restructure or looping

Andy W
Look up the CASESTOVARS command.
Andy W
apwheele@gmail.com
http://andrewpwheeler.wordpress.com/