Date: Thu, 28 May 1998 10:58:37 -0400
Reply-To: Gonzalo Kmaid <gkmaid@INTERNET.COM.UY>
Sender: "SPSSX(r) Discussion" <SPSSX-L@UGA.CC.UGA.EDU>
From: Gonzalo Kmaid <gkmaid@INTERNET.COM.UY>
Subject: how to use table cell info in syntax
Content-Type: text/plain; charset="us-ascii"
I would like to use the particular values obtained in a crosstab table to
create a new var to be used to weight a particular sample. The weighting
variable is always defined the same way. So life would be less tedious if
that can be done automatically. The situation is as follows:
Usually I produce a crosstab between age and sex controlling by region
(three, two, and two groups respectively).
1. I compute the actual proportion of cases in each cell with respect to
the total sample size (by hand).
2. Elswhere, I have the real value for each cell combination (population
distribution value for region equal 0, sex equal 0 and age equal 0 and so
on). Therefore, each factor weight is equal to the population cell value
divided the sample proportion calculated in 1.
Through a series of if statements I create the weighting variable
if ((age eq 0 and sex eq 1) and region eq 0) peso1=x.xxxx
if ((age eq 1 and sex eq 0) and region eq 1) peso1=z.zzzz
Where x.xxx is the result of 2 (same for the rest of statements)
What I would like to do is to tell spss to divide each cell value over the
sample size, and then use these numbers to calculate each factor weight
score, and then write them into the series of if statements. Any hint on
how to acomplish this? Any reference to check? TIA
Carlos Maria Morales 944/801