Restructure the table

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

Restructure the table

Ujjawal
Hi SPSS Experts,

I have a table consisting three variables - Questions, Dummy, Score. The variable "Dummy" consists of two values - either 0 or 1. I want to restructure the table.

The current table is shown below -

Questions Dummy Score
q7 0 -0.166
q7 1 0.085
q8 0 -0.242
q8 1 0.085
q9 0 -0.187
q9 1 0.07
q10 0 -0.222
q10 1 0.077
q11 0 -0.206
q11 1 0.043
q12 0 -0.278
q12 1 0.08

The desired table is shown below -

Questions 0 1
q7 -0.166 0.085
q8 -0.242 0.085
q9 -0.187 0.07
q10 -0.222 0.077
q11 -0.206 0.043
q12 -0.278 0.08

Please let me know if you have any query(s). Any help would be greatly appreciated!

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

Re: Restructure the table

David Marso
Administrator
Please see CASESTOVARS command.

Ujjawal wrote
Hi SPSS Experts,

I have a table consisting three variables - Questions, Dummy, Score. The variable "Dummy" consists of two values - either 0 or 1. I want to restructure the table.

The current table is shown below -

Questions Dummy Score
q7 0 -0.166
q7 1 0.085
q8 0 -0.242
q8 1 0.085
q9 0 -0.187
q9 1 0.07
q10 0 -0.222
q10 1 0.077
q11 0 -0.206
q11 1 0.043
q12 0 -0.278
q12 1 0.08

The desired table is shown below -

Questions 0 1
q7 -0.166 0.085
q8 -0.242 0.085
q9 -0.187 0.07
q10 -0.222 0.077
q11 -0.206 0.043
q12 -0.278 0.08

Please let me know if you have any query(s). Any help would be greatly appreciated!

Thanks in advance
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?"
Reply | Threaded
Open this post in threaded view
|

Re: Restructure the table

PRogman
In reply to this post by Ujjawal
Maybe the wizard in:  Main menu > Data > Restructure...