LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2006)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 27 Apr 2006 12:06:20 -0300
Reply-To:     Hector Maletta <hmaletta@fibertel.com.ar>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Hector Maletta <hmaletta@fibertel.com.ar>
Subject:      Re: Custom tables with top/bottom, mean and std info
Comments: To: "Andy Devos (Gent)" <andy.devos@synovate.com>
In-Reply-To:  <0B97C012963FEB4098368ACA8905D83A0C4D20@beant1adm01.SCI.local>
Content-Type: text/plain; charset="us-ascii"

It is all possible with CTABLES or TABLES. However, for the subtotals (top2, top3 and bottom2) you want to create separate variables. For instance:

COMPUTE TOP2=(VARX=1 OR VARX=2).

COMPUTE TOP3=(VARX=1 OR VARX=2 OR VARX=3).

COMPUTE BOTTOM2=(VARX=4 OR VARX=5).

MISSING VALUES VARX TOP2 TOP3 BOTTOM3 (0, 6 THRU HIGHEST).

TABLES /PTOTAL=TOTAL

/TABLE TOTAL+VARX+TOP2+TOP3+BOTTOM2 BY (STATISTICS)

/STAT VALIDN (VARX TOP2 TOP3 BOTTOM2)

CPCT (VARX (PCT7.2) TOP2 (PCT7.2) TOP3 (PCT7.2) BOTTOM2 (PCT7.2)).

TABLES /PTOTAL=TOTAL

/OBS VARX TOP2 TOP3 BOTTOM2

/TABLE TOTAL+VARX+TOP2+TOP3+BOTTOM2 BY (STATISTICS)

/STATS MEAN (VARX (F5.2) TOP2 (F5.2) TOP3 (F5.2) BOTTOM2 (F5.2))

STDDEV (VARX (F5.2) TOP2 (F5.2) TOP3 (F5.2) BOTTOM2 (F5.2)).

MISSING VALUES VARX TOP2 TOP3 BOTTOM3 ().

TABLES /PTOTAL=TOTAL

/TABLE TOTAL+VARX BY (STATISTICS)

/STAT VALIDN CPCT (VARX (PCT7.2)).

I excluded the additional variables in this table for missing values, for they do not have any user missing value.

I have not tested it but should work.

This is for only one variable (VARX). You can include as many as needed. If they are too many you may want to use some LOOP structure to create the additional variables for all of them, but beware of tables that become too large.

Hector

-----Mensaje original----- De: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] En nombre de Andy Devos (Gent) Enviado el: Thursday, April 27, 2006 10:50 AM Para: SPSSX-L@LISTSERV.UGA.EDU Asunto: Custom tables with top/bottom, mean and std info

Dear all,

Is it possible to produce a table for categorical variables (rating 1

till 5) in Spss containing the following info:

- rating counts and percentages,

- top2 box (2 highest ratings as subtotal), top3 and bottom2

- mean and standard deviation

- count and percentages of user-missings (not necessarily in the same

table) - may not count for the calculation of mean/stddev

No problem each one of those separately by ctables, but to combine it?

E.g. top2 and top3 can not be calculated together cause there exists

overlap between these subtotals

Also mean and stddev can not be calculated for single nominal

variables, which is the case here.

Redefining the measurement scale does not help either, as the

top/bottom2 calculation requires that.

So any idea how to overcome this efficiently?

ctables

/TABLE q1 [count colpct ] BY total+ ps6 + ps7 + anti_cat + agegroup +

descrip

/categories variables= q1 [1,2,Subtotal='Bottom2',3,4,5,Subtotal='Top3']

total=yes empty=include

/slabels position=row visible=yes

.

ctables

/TABLE q1 [count colpct ] BY total+ ps6 + ps7 + anti_cat +

agegroup + descrip

/categories variables= q1[1,2,3,Subtotal='Top2',4,5] total=yes

empty=include position=before

/slabels position=row visible=yes

.

ctables

/TABLE q1 [totals[mean f5.2 stddev f5.2] ] BY total+ ps6 + ps7 +

anti_cat + agegroup + descrip

/categories variables= q1[1,2,3,4,5] total=yes empty=include

/slabels position=row visible=yes

.

ctables

/TABLE q1 [count colpct ] BY total+ ps6 + ps7 + anti_cat + agegroup

+ descrip

/categories variables= q1 [8,9] total=yes empty=include

/slabels position=row visible=yes

Thanks a lot

Andy


Back to: Top of message | Previous page | Main SPSSX-L page