* variable level xxx (scale) (ordinal) (nominal ) . * delete variable N_BREAK . * erase file 'delete1.sav'. * SAVE OUTFILE='.sav' /COMPRESSED. *************. *GET FILE='.sav' *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. *********** SECOND: PREPARE FILES WITH DECILES, AND PAID VALUES FOR NEW DURABLES *************. *********** THIRD: FILES WITH ESPECIAL CASES, FREQUENCY OWNWERSHIP AND NEW & VALUE *************. cd 'C:\1 Barbados\analisys' . ***************************************************************************************************************************************************. *** We have the purhase value for new in section 14 (non-food) ***We have tenency of new and old items and quantity in section 134 (houseing) . *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. *************************** FIRST: ESTIMATE TOTAL ONSUMPTION WITHOUT DURABLES *******************************. ***use the file with the cover to set the households lists. GET FILE='01 household_cover_12a_13.sav' /keep = hhid hhid_string psu stratum hh_size weight . EXECUTE. ***2,508 households . SORT CASES BY hhid(A). ***3-Education & 5-Health . . MATCH FILES /FILE=* /TABLE='a1 educ_health.sav' /RENAME (hh_size hhid_string psu weight = d0 d1 d2 d3 ) /BY hhid /DROP= d0 d1 d2 d3 . EXECUTE. ***11-Personal expenditures MATCH FILES /FILE=* /TABLE='b1 personal_exp.sav' /RENAME (hh_size hhid_string psu stratum weight = d0 d1 d2 d3 d4) /BY hhid /DROP= d0 d1 d2 d3 d4. EXECUTE. ***14-Non Food MATCH FILES /FILE=* /TABLE='C:\1 Barbados\analisys\c1 non food.sav' /RENAME (hh_size hhid_string psu stratum weight = d0 d1 d2 d3 d4) /BY hhid /DROP= d0 d1 d2 d3 d4. EXECUTE. *** 14-Food MATCH FILES /FILE=* /TABLE='C:\1 Barbados\analisys\d2 food.sav' /RENAME (hh_size hhh_gender hhid_string psu stratum weight = d0 d1 d2 d3 d4 d5) /BY hhid /DROP= d0 d1 d2 d3 d4 d5. EXECUTE. ***13 and 14 Value of House use. MATCH FILES /FILE=* /TABLE='C:\1 Barbados\analisys\e1 house.sav' /RENAME (hh_size hhid_string psu stratum weight = d0 d1 d2 d3 d4) /BY hhid /DROP= d0 d1 d2 d3 d4. EXECUTE. ***Put 0 in the missing entries . RECODE education education_ex food_school food_school_ex health health_ex food_away food_away_ex other_tobacco other_tobacco_ex comunication comunication_ex school_bus school_bus_ex entertaiment entertaiment_ex house1 house1_ex house2 house2_ex h_services h_services_ex insurance insurance_ex clothing clothing_ex transport transport_ex personal personal_ex fun fun_ex furniture furniture_ex other other_ex food food_ex house house_ex (SYSMIS=0). EXECUTE. ***individual house varaibls are not used. delete variable house1 . delete variable house1_ex . delete variable house2 . delete variable house2_ex . ***Education includes: school bus Section 11-Personal exp, item 4202 and section 3-Education, questions 3.21a to 3.21o, *** excluding 3.21f (partial total), and 3.21m (food at school) . COMPUTE education = education + school_bus . COMPUTE education_ex = education_ex + school_bus_ex . execute . delete variable school_bus . delete variable school_bus_ex . ***Food includes food at school ( section 3-Education, questions3.21m) food bought and consumed away from home *** Section 11-Personal exp, items 3901 ti 3998) and Section 14 A, food and drinks at home, items 0101 to 1098. . COMPUTE food = food + food_school + food_away . COMPUTE food_ex = food_ex + food_school_ex + food_away_ex . EXECUTE . delete variable food_school . delete variable food_school_ex. delete variable food_away . delete variable food_away_ex . ***Health includes insurance expenditures (section 14b-Non-food, item 1701 to 1798) and health expenditures ***from section 5-Health, questions 5.21, 5.23, 5.25, and 5.28 . COMPUTE health = health + insurance . COMPUTE health_ex = health_ex + insurance_ex . EXECUTE . delete variable insurance . delete variable insurance_ex . *** Transport and comunication includes values from section 11-Personal exp, items 4101-4298, 4304, 4305, 4401, and 4402 . *** and from section 14b-Non food, items 1802-1898, 3301-3398, 3403, 3501 to 3598 COMPUTE comunication = comunication + transport . COMPUTE comunication_ex = comunication_ex + transport_ex . EXECUTE . delete variable transport . delete variable transport_ex . ***Entertaiment incudes values from section 11-Personal exp, items 4301, to 4303, and 4306 to 4398 and from ***section 14b-Non food, 2005, 3601-3698, 3701, 3706 to 3798, and 3806 COMPUTE entertaiment = entertaiment + fun . COMPUTE entertaiment_ex = entertaiment_ex + fun_ex . EXECUTE . delete variable fun . delete variable fun_ex . ***Other services and tobbacco includes vales from section 11-Personal exp, items 4001, to 4098 and from ***section 14b-Non food, items 1105, 2001 to 2004, 2802, 2006 to 2098, 3013, and 3801 to 3804 . COMPUTE other = other + other_tobacco . COMPUTE other_ex = other_ex + other_tobacco_ex . EXECUTE . delete variable other_tobacco . delete variable other_tobacco_ex . ***Oher variables come directly form section 14b-Non food, items:v ***Housing services ( h_services & h_services_ex) : 1201 to 1298, 1801 ***Clothes and fabrics ( clothing & clothing_ex): 2101 to 2198, 2201 to 2298, 2301 to 2398, 2401 to 2498, *** 2501 to 2503, 2508 to 2598 and 3101 to 3198. ***Personal expenditures (personal & personal_ex): 1301 to 1398, 1401 to 1498, 1501 to 1598, *** 1601 to 1698, and 1901 to 1998, ***Small appliances, furniture and other small durables (furniture & furniture_ex): 2504 to 2507, *** 2801 to 2806, 3809 to 2898, 2901 to 2998, 3001, 3005, 3009, 3010, 312, 3201 to 3298 and 3404. ***Use value of house (house & house_ex): 1101, and for other households, regression prediction based in relationship ***between variable 1101 and household characteristics in section 13-Housing RECODE education education_ex health health_ex comunication comunication_ex entertaiment entertaiment_ex h_services h_services_ex clothing clothing_ex personal personal_ex furniture furniture_ex other other_ex food food_ex house house_ex (SYSMIS=0). EXECUTE. COMPUTE cons=food+house+h_services+health+education+clothing+comunication+personal+entertaiment+ furniture+other. VARIABLE LABELS cons 'Consumption/month/household'. execute . COMPUTE cons_ex=food_ex+house_ex+h_services_ex+health_ex+education_ex+clothing_ex+ comunication_ex+personal_ex+entertaiment_ex+ furniture_ex+other_ex. VARIABLE LABELS cons_ex 'Estimated consumption /month/household'. execute . COMPUTE per_ex=cons_ex / cons. VARIABLE LABELS per_ex 'percentage estimated '. EXECUTE. SAVE OUTFILE='delete1.sav' /COMPRESSED. ***********. GET FILE='delete1.sav'. ***ID cases toexclude and adjust weights . ***146 cases with 30% or more of estimated value. Do not use this cases because too much information ***was estimated. The # of cases and %'s are high in part because over 10% of the food value information ***was missing, and a total of 17% of food values are estimated. COMPUTE delete_cases=0. IF (per_ex >= 0.30) delete_cases=1. EXECUTE. COMPUTE weight999=weight * hh_size. EXECUTE. IF (delete_cases = 0) weight999_reduced=weight999. EXECUTE. ***Estimate total weight per PSU with and without deleted cases. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK= psu /weight999_sum=SUM(weight999) /weight999_reduced_sum=SUM(weight999_reduced). AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK= /weight999_national=SUM(weight999). ***The value in weight999_national = 211,185.2808 should not change IF (delete_cases = 0) adj_psu=weight999_sum / weight999_reduced_sum. VARIABLE LABELS adj_psu 'Factor to adjust weight (multiplier)'. EXECUTE. ***adjust the new weight variable . COMPUTE weight=weight * adj_psu. EXECUTE. ***delete the cases with too much estimation . ***2,508 cases. FILTER OFF. USE ALL. SELECT IF (delete_cases = 0). EXECUTE. ****2,362 cases . ***Verify the new sum is the same as the olc. COMPUTE weight999=weight * hh_size. EXECUTE. AGGREGATE /OUTFILE=* MODE=ADDVARIABLES /BREAK= /weight999_national_b=SUM(weight999). DESCRIPTIVES VARIABLES=weight999_national weight999_national_b /STATISTICS=MEAN STDDEV MIN MAX. ***both values are exactly the same delete varaibles delete_cases weight999 weight999_reduced weight999_sum weight999_reduced_sum adj_psu weight999_national weight999_national_b . COMPUTE food_pc = food / hh_size . COMPUTE house_pc = house / hh_size . COMPUTE h_services_pc = h_services / hh_size . COMPUTE health_pc = health / hh_size . COMPUTE education_pc = education / hh_size . COMPUTE clothing_pc = clothing / hh_size . COMPUTE comunication_pc = comunication / hh_size . COMPUTE personal_pc = personal / hh_size . COMPUTE entertaiment_pc = entertaiment / hh_size . COMPUTE furniture_pc = furniture / hh_size . COMPUTE other_pc = other / hh_size . COMPUTE cons_pc = cons / hh_size . EXECUTE. COMPUTE weight3=weight * hh_size. EXECUTE. WEIGHT BY weight3. DESCRIPTIVES VARIABLES=food_pc house_pc h_services_pc health_pc education_pc clothing_pc comunication_pc personal_pc entertaiment_pc furniture_pc other_pc cons_pc /STATISTICS=MEAN. ***create 100 groups with equal population, ordered by consumption er cápita . SORT CASES BY cons_pc(A). WEIGHT BY weight3. RANK VARIABLES=cons_pc (A) /RANK /NTILES(5) /PRINT=YES /TIES=MEAN. delete varaible Rcons_pc . rename variable ( Ncons_pc=quintile). SORT CASES BY cons_pc(A). WEIGHT BY weight3. RANK VARIABLES=cons_pc (A) /RANK /NTILES(10) /PRINT=YES /TIES=MEAN. delete varaible Rcons_pc . rename variable ( Ncons_pc=decile). SORT CASES BY cons_pc(A). WEIGHT BY weight3. RANK VARIABLES=cons_pc (A) /RANK /NTILES(100) /PRINT=YES /TIES=MEAN. delete varaible Rcons_pc . rename variable ( Ncons_pc=centil). COMPUTE engels=food_pc / cons_pc. VARIABLE LABELS engels 'food_pc/consumption_pc'. EXECUTE. SAVE OUTFILE='f0 agregate.sav' /keep = hhid hhid_string psu stratum hh_size weight weight3 quintile decile centil engels per_ex food house h_services education health comunication clothing personal furniture entertaiment other cons food_ex house_ex h_services_ex education_ex health_ex comunication_ex clothing_ex personal_ex furniture_ex entertaiment_ex other_ex cons_ex food_pc house_pc h_services_pc education_pc health_pc comunication_pc clothing_pc personal_pc furniture_pc entertaiment_pc other_pc cons_pc . ***********. GET FILE='f0 agregate.sav'. ***********************************************************************. GET FILE='f0 agregate.sav' /keep = hhid hhid_string psu stratum hh_size weight weight3 quintile decile centil engels food_pc house_pc h_services_pc health_pc education_pc clothing_pc comunication_pc personal_pc entertaiment_pc furniture_pc other_pc cons_pc . COMPUTE nonfood_pc=house_pc+h_services_pc+health_pc+education_pc+clothing_pc+comunication_pc+ personal_pc+entertaiment_pc+furniture_pc+other_pc. VARIABLE LABELS nonfood_pc 'Total non-food consumption/month/Per Capita'. EXECUTE. Variable label education_pc"Education espenditure/month/Per Capita" . Variable label health_pc"Total health expenditure/month/Per Capita" . Variable label comunication_pc"Transport and comunications/month/Per Capita" . Variable label entertaiment_pc"Recreation, entertaiment/month/Per Capita" . Variable label h_services_pc"Household services/month/Per Capita" . Variable label clothing_pc"Clothing, shoes, fabricmonth/household" . Variable label personal_pc"Personal care, stationary, cleanning supplies/month/Per Capita" . Variable label furniture_pc"Furniture, small durables, electronics, electodomestics, etc./month/Per Capita" . Variable label other_pc"Other consumption/month/Per Capita" . Variable label food_pc"BB dollars in food/monthhousehold" . Variable label house_pc"House value from predicted rent or atual private rent/month/Per Capita" . Variable label cons_pc"Consumption/month/Per Capita" . Variable label nonfood_pc 'Total non-food consumption/month/Per Capita'. Variable label weight3 "Weight * Household size". SAVE OUTFILE='f1 agregate.sav' / keep = hhid hhid_string psu stratum hh_size weight weight3 quintile decile centil engels food_pc house_pc h_services_pc education_pc health_pc comunication_pc clothing_pc personal_pc furniture_pc entertaiment_pc other_pc cons_pc nonfood_pc . ***********. GET FILE='f1 agregate.sav' . erase file "delete1.sav". DESCRIPTIVES VARIABLES=food_pc house_pc h_services_pc health_pc education_pc clothing_pc comunication_pc personal_pc entertaiment_pc furniture_pc other_pc cons_pc /STATISTICS=MEAN . * Custom Tables. CTABLES /VLABELS VARIABLES=nonfood_pc food_pc house_pc h_services_pc health_pc education_pc clothing_pc comunication_pc personal_pc entertaiment_pc furniture_pc other_pc cons_pc decile DISPLAY=DEFAULT /TABLE nonfood_pc [S][MEAN] + food_pc [S][MEAN] + house_pc [S][MEAN] + h_services_pc [S][MEAN] + health_pc [S][MEAN] + education_pc [S][MEAN] + clothing_pc [S][MEAN] + comunication_pc [S][MEAN] + personal_pc [S][MEAN] + entertaiment_pc [S][MEAN] + furniture_pc [S][MEAN] + other_pc [S][MEAN] + cons_pc [S][MEAN] BY decile /CATEGORIES VARIABLES=decile ORDER=A KEY=VALUE EMPTY=EXCLUDE.