* variable level xxx (scale) (ordinal) (nominal ) . * delete variable N_BREAK . * erase file 'delete1.sav'. * SAVE OUTFILE='.sav' /COMPRESSED. *************. *GET FILE='.sav' *************************** *******************************. cd 'C:\1 Barbados\analisys' . GET FILE='kilocalories total and value for each hh.sav'. COMPUTE cost_per_calorie=value_day_sum / calories_day_sum. COMPUTE cost_2104calorie= 2104 *cost_per_calorie . COMPUTE cost_2104calorie_month= cost_2104calorie * 365 / 12. EXECUTE. SORT CASES BY hhid(A). SAVE OUTFILE='delete1.sav' /COMPRESSED. ***********. GET FILE= 'delete1.sav' . **********************************************************************************************************. GET FILE= 'f1 agregate.sav' . SORT CASES BY hhid(A). MATCH FILES /FILE=* /RENAME (clothing_pc comunication_pc education_pc entertaiment_pc furniture_pc h_services_pc health_pc house_pc other_pc personal_pc = d0 d1 d2 d3 d4 d5 d6 d7 d8 d9) /TABLE='C:\1 Barbados\analisys\delete1.sav' /RENAME (calories_day_sum hh_size hhid_string psu stratum value_day_sum weight = d10 d11 d12 d13 d14 d15 d16) /BY hhid /DROP= d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16. EXECUTE. WEIGHT OFF. ***139 households do not have calorie content , do not use them for the calorie estimate . . COMPUTE data_ok=0. IF ( cost_2104calorie_month>0) data_ok=1. EXECUTE. ***2,223 households ***Select a the poor (this is an interactive process, at the end of the poverty determinatin, we run the program from here ***, using the households bellow the poverty line, un, it againwith the new group, look at the results, run it again, until the group and the ***results are within half a percentage point. (the process is convergent) . IF (data_ok=1 and centil >= 10 and centil <= 26) reference1=1. EXECUTE. ***Estimate the average cost fo the food basket for thos households . IF (reference1=1) cal_ref1=cost_2104calorie_month. EXECUTE. WEIGHT BY weight3. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK= /cost_2104calorie_month_mean=MEAN(cal_ref1). ***For the total poverty line we select a second group of households, those with total consumption, close to the poverty line. IF ((cons_pc >= cost_2104calorie_month_mean * 0.9 ) and (cons_pc < cost_2104calorie_month_mean * 1.1) and data_ok=1 ) reference2=1. EXECUTE. ***estimate the engels coeficient of this group . IF (reference2=1) engels_ref2= engels. EXECUTE. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK= /engels_ref2_mean_1=MEAN(engels_ref2). COMPUTE line_extreme=cost_2104calorie_month_mean. variable label line_extreme "Extreme poverty line/month/Per Capita" . EXECUTE. COMPUTE line_moderate=line_extreme / engels_ref2_mean_1. variable label line_moderate "Moderate poverty line/month/Per Capita" . EXECUTE. ***create the poverty clasifications . COMPUTE poor_extreme=0. IF (cons_pc < line_extreme) poor_extreme=1. EXECUTE. COMPUTE poor_all=0. IF (cons_pc < line_moderate) poor_all=1. EXECUTE. COMPUTE poor=3. IF (poor_all = 1) poor=2. IF (poor_extreme = 1) poor=1. EXECUTE. FREQUENCIES VARIABLES=poor /ORDER=ANALYSIS. Variable labels poor_extreme "Extreme Poor: consumption