computing chi-square from existing table data

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

computing chi-square from existing table data

Leslie Horst
Suppose I have data of the following form:

freqrelate      presyears       relatecount
1               1               111
1               2               122
1               3               112
1               4               113
2               1               63
2               2               61
2               3               76
2               4               85

Freqrelate is a classification variable as is presyears - I took these
data from an existing table.  Relatecount is the cell count for each of
the cells in the 2x4 table defined by freqrelate and presyears.  I
remember once (long ago) having a similar situation and being somehow
able to use SPSS to weight by the variable with the cell frequencies in
it and get the table statistics, but I can no longer remember how.  I
took a quick look in Raynald's Tools, but didn't find anything.  How can
I do this in syntax?  Thanks in advance.

Leslie Horst, Ph.D.
Maguire Associates, Inc.
5 Concord Farms
555 Virginia Rd., Suite 201
Concord, MA 01742
Reply | Threaded
Open this post in threaded view
|

Re: computing chi-square from existing table data

Dominic Lusinchi
Leslie, use the WEIGHT function: i.e. WEIGHT BY relatecount before the
CROSSTAB procedure.

Dominic Lusinchi
Statistician
Far West Research
Statistical Consulting
San Francisco, California
415-664-3032
www.farwestresearch.com
-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Leslie Horst
Sent: Wednesday, September 13, 2006 3:03 PM
To: [hidden email]
Subject: computing chi-square from existing table data

Suppose I have data of the following form:

freqrelate      presyears       relatecount
1               1               111
1               2               122
1               3               112
1               4               113
2               1               63
2               2               61
2               3               76
2               4               85

Freqrelate is a classification variable as is presyears - I took these
data from an existing table.  Relatecount is the cell count for each of
the cells in the 2x4 table defined by freqrelate and presyears.  I
remember once (long ago) having a similar situation and being somehow
able to use SPSS to weight by the variable with the cell frequencies in
it and get the table statistics, but I can no longer remember how.  I
took a quick look in Raynald's Tools, but didn't find anything.  How can
I do this in syntax?  Thanks in advance.

Leslie Horst, Ph.D.
Maguire Associates, Inc.
5 Concord Farms
555 Virginia Rd., Suite 201
Concord, MA 01742