Date: Thu, 6 Sep 2001 00:31:25 -0300
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: Hector Maletta <hmaletta@FIBERTEL.COM.AR>
Subject: Re: Repeated compute for a quick method
Content-Type: text/plain; charset=us-ascii
if you have already in place the mid value of each income bracket, you
only need one command, namely:
COMPUTE CAPITA=midvalue / famsize.
If one individual, for instance, is in the 10,000-19,999 income group,
you'll have one variable (call it MIDVALUE) with the numerical value
$15,000 (the midvalue of the income interval, and another value with
that individual's family size, say 5 members. In that case, the CAPITA
variable will equal 15000/5=3000. And so on for every other individual
in your survey.
Of course, if you originally had only a coded variable representing
income brackets, coded (for instance) 1 for incomes below 10000, 2 for
incomes between 10000 and 19999, 3 for those between 20000 and 39999 and
so on, you'll have to create first a MIDVALUE variable. You can do that
by means of a single RECODE command, as follows:
RECODE BRACKET (1 = 5000)(2=15000) (3=30000) ..... (8=150000) /INTO
For the upper income group, usually open ended, such as "1,000,000 or
more", you'll have to assume a "midvalue", representing the presumed
average income of people in that bracket.
Once you have this MIDVALUE variable in place you can compute per
capita income as indicated before.
Universidad del Salvador
"Gao, Peter" wrote:
> Dear list members,
> May I ask some of you for a small help?
> I have two variables, one is an individual's family size (1 through 15) and
> the other his or her family income (grouped into 9 groups). Records are more
> than several thousands. My task is to compute per capita income based on
> number of persons in each family and the mid point of family income. This
> will required 15X9= 135 syntax commands. I am not familiar with writing a
> program that will do the repeated compute commands. This requires do loop I
> guess. Could someone give me the sample syntax so I can learn a new method
> of doing fast computation. Thank you in advance.
> Peter Gao
> Research Analyst
> County of Orange Health Care Agency