Re: Chi Square Question

From: Bruce Weaver (bweaver_at_lakeheadu.ca)
Date: 01/25/05


Date: Tue, 25 Jan 2005 08:50:21 -0500

P. wrote:

> Hi Thanks for your reply Rich, you are a great help. To answer your
> question: yes I am referring to the 22 categories total.
>
> My main question for SPPS input is: I have my data laid out as follows
> with N sample values shown below for the 22 categories. Taking your
> advice, I am unsure how to construct a contingency table from the
> format below. I know this must be a basic question :) but at the
> moment this should get me started if I can find out. Thanks again for
> all your detailed help.
>
> Cat1 Cat2 Cat3 ... Cat22
> type1 37 0 1 ...
> type2 12 4 14 ...
> type3 0 23 19 ...
> type4 0 0 0 ...
> type5 1 0 4 ...
>
>
> Best Regards,
> S.P.

You want your file to look like this:

TYPE CAT COUNT
1 1 37
1 2 0
1 3 1
etc
2 1 12
2 2 4
2 4 14
etc (5*22 = 110 rows in total)

Then run the following syntax.

* ---- start of syntax ---- .

weight by count.
crosstabs
  /table = type by cat
  /stat = chisq.

* ----- end of syntax ----- .

The 0-counts will cause a warning message to appear (when you use
WEIGHT), but it is not serious. And as Rich (I think) suggested, you
may find that you need to combine some of the 22 categories if the
expected frequencies are too low.

-- 
Bruce Weaver
bweaver@lakeheadu.ca
www.angelfire.com/wv/bwhomedir