**Date:** Tue, 1 Feb 2005 13:27:49 -0800
**Reply-To:** Paul Hover <pfhover2@yahoo.com>
**Sender:** "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
**From:** Paul Hover <pfhover2@yahoo.com>
**Subject:** Tables with results for every respondent
**Content-Type:** text/plain; charset=us-ascii
Hi all,

Suppose I have a dataset with many respondents and many variables. I would like to send every respondent a report with tables. Each table describes the answers of one question and there are two columns: one column with the score of the specific respondent and one colomn with the overall score except the specific respondent’s score. Is there an easy way to do this in SPSS? I’ve come this far (example with small dataset), but I’m not sure whether I’m on the right track.

*** start syntax

* datafile

DATA LIST /resp 1-2 q1 4 q2 6.

BEGIN DATA

1 1 3

2 3 2

3 1 1

4 3 2

5 1 1

6 1 2

7 1 2

8 2 3

9 4 2

10 3 4

END DATA.

var label resp 'respondent nr'.

var label q1 'question 1'.

value label q1 1 'answer 1' 2 'answer 2' 3 'answer 3' 4 'answer 4'.

var label q2 'question 2'.

val label q2 1 'answer 1' 2 'answer 2' 3 'answer 3' 4 'answer 4'.

* create variables for tables for respondent 1, 2 and 3

if (resp = 1) resp1 = 1.

recode resp1 (1 = sysmis) (else = 1) into totalexcept1.

if (resp = 2) resp2 = 1.

recode resp2 (1 = sysmis) (else = 1) into totalexcept2.

if (resp = 3) resp3 = 1.

recode resp3 (1 = sysmis) (else = 1) into totalexcept3.

val label resp1 1 'Your answer'.

val label resp2 1 'Your answer'.

val label resp3 1 'Your answer'.

val label totalexcept1 1 'Total of other answers'.

val label totalexcept2 1 'Total of other answers'.

val label totalexcept3 1 'Total of other answers'.

exe.

* create tables for respondent 1 (using the variables q1 and q2)

TABLES

/FTOTAL= $t000001 "Total"

/TABLE=q1 + $t000001 BY resp1 + totalexcept1

/STATISTICS

cpct( q1( PCT5.1 ) 'Col %':resp1 totalexcept1 )

cpct( $t000001( PCT5.1 ) 'Col %':resp1 totalexcept1 )

validn( $t000001( NEQUAL5.0 )) / title 'Answers question 1'.

TABLES

/FTOTAL= $t000001 "Total"

/TABLE=q2 + $t000001 BY resp1 + totalexcept1

/STATISTICS

cpct( q2( PCT5.1 ) 'Col %':resp1 totalexcept1 )

cpct( $t000001( PCT5.1 ) 'Col %':resp1 totalexcept1 )

validn( $t000001( NEQUAL5.0 )) / title 'Answers question 2'.

*** end syntax

The tables are almost the way I want it, except the column ‘Your answer’. Of course there’s twice the column % of 100%. Instead of the % I would like to place a symbol (a star or a big dot) and I want to get rid of the total 100%.

Am I on the right track? If not, what to do? If yes, how to get the desired table as described above and how to handle a large database when you want to send every respondent their own answers?

Many thanks in advance!

Paul

---------------------------------
Do you Yahoo!?
Yahoo! Search presents - Jib Jab's 'Second Term'