```Date: Thu, 6 Sep 2001 00:31:25 -0300 Reply-To: hmaletta@fibertel.com.ar Sender: "SPSSX(r) Discussion" From: Hector Maletta Subject: Re: Repeated compute for a quick method Comments: To: "Gao, Peter" Content-Type: text/plain; charset=us-ascii Peter, 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 MIDVALUE. 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. Hector Maletta 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 ```

Back to: Top of message | Previous page | Main SPSSX-L page