Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Difference between TABLES and CROSSTABS?

284 views
Skip to first unread message

petersson

unread,
Oct 3, 2003, 7:50:53 AM10/3/03
to
Hi,

When I run a crosstabulation with the CROSSTABS command and compare
the output to a TABLES command I get different results... Why is that?
I use a weighting variable in both procedures. The differances are
small. Typically 4,6 compared to 4,7. Which procedure should I rely
on?

TIA

/s

Andy

unread,
Oct 4, 2003, 11:13:51 PM10/4/03
to
Tia,
CROSSTABS includes all data.

TABLES includes only valid data.
If data is missing due to system or user errors, they are not included.
This is why you have these discrepancies.
Andy

petersson

unread,
Oct 5, 2003, 6:22:16 AM10/5/03
to

S: Hmm... Are You sure. It might be that TABLES and CROSSTABS handles
missing data in different ways. But that doesn't explain the diff. I
get, since I don't have any missing data (user or system). Run the
code below. You'll se that the output is not the same. My guess is
that the two procedures are using weights differently. Maybe a
rounding thingy?

new file .
data list free
/v1 v2 weight .
begin data
1 1 4,34
2 2 2,13
1 1 3,22
1 1 3,33
2 1 2,34
2 2 1,23
1 1 1,22
1 1 1,43
2 2 2,23
1 2 2,12
1 1 1,65
2 2 2,78
2 1 3,23
1 2 2,45
2 1 1,67
end data .
exe .

weight by weight .
cross v1 by v2/cell=count col .

tables
/ftotal= $t "Total"
/table=v1 + $t by v2 > (statistics)
/statistics count( v1( F5.0 )) cpct( v1( PCT5.1 ) 'Col %':v2 ).
weight off .
use all .

Thomas Zapf-Schramm

unread,
Oct 5, 2003, 7:21:14 PM10/5/03
to
Excerpt from Google (I found it when I was tricked by the same effect):
================================================

In Release 6.1.2, when we added the Exact Tests option, we began rounding
cell counts in CROSSTABS, and calculating statistics on the rounded
numbers. We did this because the code used in the Exact option (from
Cytel, the makers of StatXact) requires integer cell counts. Many SPSS
procedures do not round noninteger weights.

The WEIGHT function in SPSS is a frequency weighting operator. Even
though it allows noninteger weights to be defined, within this context
I have never seen noninteger weights (and don't know where one would
get such a thing). Noninteger weights generally result from complex
sampling designs, which SPSS is not designed to handle (in some
procedures you can obtain valid point estimates from complex samples,
but not error estimates and therefore also not test statistics).

The TABLES module can be used to produce the same kind of tables in
CROSSTABS, and it doesn't round the cell values.

--
----------------------------------------------------------------------------
-
David Nichols Senior Support Statistician SPSS,
Inc.
Phone: (312) 329-3684 Internet: nic...@spss.com Fax: (312)
329-3668
----------------------------------------------------------------------------
-

"petersson" <pete...@my-deja.com> schrieb im Newsbeitrag
news:b35c5297.03100...@posting.google.com...

Alex Reutter

unread,
Oct 7, 2003, 11:09:55 AM10/7/03
to
Further note:

In Release 11.5, a COUNT subcommand was added to CROSSTABS that is
supposed to give you some control over how weights are handled. The
syntax is:

COUNT = [{ASIS}] [{ROUND }]
{CASE} {TRUNCATE}
{CELL}

where:

ASIS. The case weights are used as is. However, when Exact Statistics
are requested, the accumulated weights in the cells are either
truncated or rounded before computing the Exact test statistics.

CASE. The case weights are either rounded or truncated before use.

CELL. The case weights are used as is but the accumulated weights in
the cells are either truncated or rounded before computing any
statistics.

ROUND. Performs Rounding operation.

TRUNCATE. Performs Truncation opertion.


Also, if you have noninteger weights from a complex sampling design,
SPSS has added a Complex Samples option in Release 12.0, which is
considerably better than using the WEIGHT command.

--Alex


"Thomas Zapf-Schramm" <Thomas.Za...@t-online.de> wrote in message news:<blq90l$225$01$1...@news.t-online.com>...

0 new messages