crosstab summing not counting

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

crosstab summing not counting

Gary Stevens-2
I would like to sum a variable in my cross tab instead of counting it.
Other than writing a custom program is there something built into SPSS to
perform this operation.  Is there a simple program that performs this task?
Thanks for any help.
Gary
Reply | Threaded
Open this post in threaded view
|

Re: crosstab summing not counting

Beadle, ViAnn
many choices: SUMMARIZE, CTABLES, TABLES, OLAP, REPORT, AGGREGATE ...

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gary Stevens
Sent: Monday, April 09, 2007 10:08 AM
To: [hidden email]
Subject: crosstab summing not counting

I would like to sum a variable in my cross tab instead of counting it.
Other than writing a custom program is there something built into SPSS to
perform this operation.  Is there a simple program that performs this task?
Thanks for any help.
Gary
Reply | Threaded
Open this post in threaded view
|

Re: crosstab summing not counting

Peck, Jon
In reply to this post by Gary Stevens-2
You can use the means procedure for this.  For example,

MEANS
  TABLES=ebill  BY callcard BY churn
  /CELLS COUNT SUM  .

It offers a wide choice of statistics (22 if I counted right).  The output is organized differently from crosstabs, but you can use the pivoting trays to rearrange into a similar organization.

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gary Stevens
Sent: Monday, April 09, 2007 10:08 AM
To: [hidden email]
Subject: [SPSSX-L] crosstab summing not counting

I would like to sum a variable in my cross tab instead of counting it.
Other than writing a custom program is there something built into SPSS to
perform this operation.  Is there a simple program that performs this task?
Thanks for any help.
Gary
Reply | Threaded
Open this post in threaded view
|

Re: crosstab summing not counting

Gary Stevens-2
In reply to this post by Gary Stevens-2
An example of summing in a crosstab -

A data set of hospital patients contains the variables:  year, county,
sex, length of stay (LOS).  Each row is a patient record, LOS is number of
days in the hospital for that record.    The data set is.

year  county  sex  LOS
1998   Mon     M    26
1998   Mon     M    10
1997   Mon     F     5
1997   Mon     F     6
1996   Mon     F     3

In the crosstab, Sex is the column(s), the rows are nested year, county.
instead of counting LOS, they are summed so the resultant crosstab is in
               F     M
Year   1996
County  mon    3

Year   1997
County  mon   11

Year   1998
County  mon         36
Reply | Threaded
Open this post in threaded view
|

Re: crosstab summing not counting

Gary Stevens-2
In reply to this post by Gary Stevens-2
I'm all set.  Thank you all
Gary