| Date: | Thu, 8 May 2003 17:57:19 -0400 |
| Reply-To: | "Flechet, Jean-Francois" <Jef.Flechet@BASES.com> |
| Sender: | "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU> |
| From: | "Flechet, Jean-Francois" <Jef.Flechet@BASES.com> |
| Subject: | Re: Contingency table |
| Content-Type: | text/plain; charset="iso-8859-1" |
Never mind!! I figured it out on my own.
Here is the code, I used in case someone is interested.
vector b(169).
vector cpi=cpi1 to cpi13.
vector psy=psy1 to psy13.
loop #i=1 to 13.
loop #j=1 to 13.
if cpi(#j)=1 and psy(#i)=1 b(13*(#i-1)+#j)=1.
end loop.
end loop.
exe.
-----Original Message-----
From: Flechet, Jean-Francois
Sent: Thursday, May 08, 2003 4:32 PM
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Contingency table
Hello All,
Is there an easy way to compute a contingency table? I thought the crosstabs
procedure would do that but it produces a bunch of 2x2 contingency table
instead of a big one.
I have 2 sets of 13 variables, one set about purchase interest, the other
set about psychographics. I want to get a table where element (I,j) would be
the number of people who said yes to purchase interest and replied favorably
to the psychographics question.
I can obviously type or copy paste the results of the crosstabs but that's
not really efficient!!!!!
Jean-François
|