***variable level xxx (scale) (ordinal) (nominal ) . cd 'C:\1 Barbados\analisys' . ***to bring and sort the file with the rent information . GET FILE='c1 non food.sav' /keep= =hhid_string hhid house1 house1_ex house2 house2_ex h_services . ***cases with estimated = reported value mean no value was reported. If that is the case, it should be treated as the rest of the households **that will be estimated usin the regresion . DO IF (house1 = house1_ex). RECODE house1 house1_ex (ELSE=0). END IF. EXECUTE. SORT CASES BY hhid(A). SAVE OUTFILE='delete1.sav' /COMPRESSED. ***********. GET FILE='delete1.sav'. *******************************************************************************************. ***T0 create GET FILE='01 household_cover_12a_13.sav' keep = hhid hhid_string weight psu stratum hhh_gender hh_size visit1_day visit1_month visit1_year q13_00 q13_01 q13_02 q13_03 q13_04 q13_05 q13_06 q13_07 q13_08 q13_09 q13_10 q13_11 q13_12a q13_12b q13_12c q13_12d q13_12e q13_12f q13_12g q13_13 q13_14 q13_15 q13_16 q13_17 q13_18 q13_19 q13_20 q13_21 q13_22a q13_22b q13_22c q13_22d q13_22e q13_22f q13_22g q13_22h q13_22i q13_22j q13_22k q13_22l q13_22m q13_22n q13_22o q13_22p q13_22q q13_23 q14_0a q14_0b q14_0c q14_0d q15_00 q15_01 q15_02 . ***2,508 lines . SORT CASES BY hhid(A). MATCH FILES /FILE=* /TABLE='C:\1 Barbados\analisys\delete1.sav' /RENAME (hhid_string = d0) /BY hhid /DROP= d0. EXECUTE. ***112 household do not have non food information . RECODE h_services (SYSMIS= 0). EXECUTE. RECODE house1 house1_ex house2 house2_ex (0=SYSMIS). EXECUTE. ***Explore variable to create multiple regresion . formats house1 (comma8.0) . IF (house2 > 0) house12=house2. IF (house1 > 0) house12=house1. EXECUTE. USE ALL. COMPUTE filter_$=(house12 > 0). FILTER BY filter_$. EXECUTE. * Custom Tables. CTABLES /VLABELS VARIABLES=q13_00 q13_01 q13_02 q13_03 q13_05 q13_08 q13_09 q13_10 q13_11 q13_12a q13_12b q13_12c q13_12d q13_12e q13_12f q13_12g q13_13 q13_14 q13_15 q13_16 q13_17 q13_18 q13_19 q13_20 q13_21 q13_22a q13_22b q13_22c q13_22d q13_22e q13_22f q13_22g q13_22h q13_22i q13_22j q13_22k q13_22l q13_22m q13_22n q13_22o q13_22p q13_22q q13_23 q14_0a q14_0b q14_0c q14_0d q15_00 q15_01 q15_02 house12 DISPLAY=DEFAULT /TABLE q13_00 [C] + q13_01 [C] + q13_02 [C] + q13_03 [C] + q13_05 [C] + q13_08 [C] + q13_09 [C] + q13_10 [C] + q13_11 [C] + q13_12a [C] + q13_12b [C] + q13_12c [C] + q13_12d [C] + q13_12e [C] + q13_12f [C] + q13_12g [C] + q13_13 [C] + q13_14 [C] + q13_15 [C] + q13_16 [C] + q13_17 [C] + q13_18 [C] + q13_19 [C] + q13_20 [C] + q13_21 [C] + q13_22a [C] + q13_22b [C] + q13_22c [C] + q13_22d [C] + q13_22e [C] + q13_22f [C] + q13_22g [C] + q13_22h [C] + q13_22i [C] + q13_22j [C] + q13_22k [C] + q13_22l [C] + q13_22m [C] + q13_22n [C] + q13_22o [C] + q13_22p [C] + q13_22q [C] + q13_23 [C] + q14_0a [C] + q14_0b [C] + q14_0c [C] + q14_0d [C] + q15_00 [C] + q15_01 [C] + q15_02 [C] BY house12 [S][MEAN, COLPCT.COUNT PCT40.1, TOTALN F40.0] /CATEGORIES VARIABLES=q13_00 q13_12a q13_12b q13_12c q13_12d q13_12e q13_12f q13_12g q13_17 q13_18 q13_19 q13_20 q13_21 q13_22a q13_22b q13_22c q13_22d q13_22e q13_22f q13_22g q13_22h q13_22i q13_22j q13_22k q13_22l q13_22m q13_22n q13_22o q13_22p q13_22q q14_0a q14_0b q14_0c q14_0d q15_00 q15_02 ORDER=A KEY=VALUE EMPTY=EXCLUDE /CATEGORIES VARIABLES=q13_01 q13_02 q13_03 q13_05 q13_08 q13_09 q13_10 q13_11 q13_13 q13_14 q13_15 q13_16 q13_23 q15_01 ORDER=A KEY=VALUE EMPTY=INCLUDE. ***create variables for the regresion . FILTER OFF. USE ALL. EXECUTE. IF ( q13_01 = 2 ) own_apartment = 1 . IF ( q13_02 = 1 or q13_02 = 4 )dwelling_10or4 = 1 . IF ( q13_03 = 3 ) own_land_govt = 1 . IF ( q13_08 = 1 or q13_08 = 4 or q13_08 = 5 ) walls_hard = 1 . IF ( q13_09 = 1 ) fundation_masonry = 1 . IF ( q13_10 = 1 ) floor_masonry = 1 . IF ( q13_11 > 0 and q13_11 <5 ) roof_good = 1 . IF ( q13_13 = 3 ) fuel_electric = 1 . IF ( q13_14 = 2 ) toilet_flush_septic = 1 . IF ( q13_15 = 1 ) piped_water = 1 . IF ( q13_22a>=1 ) stove_1plus = 1 . IF ( q13_22c>=1 ) microwave_1plus = 1 . IF ( q13_22d>=1 ) refrige_1plus = 1 . IF ( q13_22e>=1 ) washing_1plus = 1 . IF ( q13_22f>=1 ) dryer_1 = 1 . IF ( q13_22g>=1 ) dish_washer_1 = 1 . IF ( q13_22h>=1 ) water_tank_1plus = 1 . IF ( q13_22i>=1 ) solar_heater_1 = 1 . IF ( q13_22j>=1 ) catle_tv_1 = 1 . IF ( q13_22k>=1 ) fix_phone_1 = 1 . EXECUTE . COMPUTE rooms_forHH = q13_18. COMPUTE cell_phones = q13_22l . COMPUTE automobile_total= q13_22q . EXECUTE . ***if no answer, use value o 0 . RECODE own_apartment dwelling_10or4 own_land_govt walls_hard fundation_masonry floor_masonry roof_good fuel_electric toilet_flush_septic piped_water stove_1plus microwave_1plus refrige_1plus washing_1plus dryer_1 dish_washer_1 water_tank_1plus solar_heater_1 catle_tv_1 fix_phone_1 rooms_forHH cell_phones automobile_total(SYSMIS=0). EXECUTE. ***Estimate the natural log of the dependent variable: rent paid, private . IF (house12 > 0) ln_house12=LN(house12). VARIABLE LABELS ln_house12 'Natural loarith of private rent paid'. EXECUTE. ***run regresions to select significant variables to maximize r squared adjusted . ***after several run the nex model wasselected REGRESSION /MISSING LISTWISE /STATISTICS COEFF OUTS R ANOVA /CRITERIA=PIN(.25) POUT(.35) /NOORIGIN /DEPENDENT ln_house12 /METHOD=ENTER dwelling_10or4 floor_masonry roof_good piped_water dryer_1 dish_washer_1 solar_heater_1 hh_size hhh_gender /SAVE PRED. COMPUTE house12_regresion=EXP(PRE_1). EXECUTE. ***Review fit with private and government rent . COMPUTE dif_private= house12_regresion - house12. COMPUTE dif_govt= house12_regresion -house2. EXECUTE. DESCRIPTIVES VARIABLES=dif_private house12 dif_govt house2 /STATISTICS=MEAN STDDEV MIN MAX. ***Regresion estimate is an average 50 BB$ bellow than the average reported BB$ 815 private rent. ***Regresion estimate is an average 395 BB$ above than the average reported BB$ 237 government rent . ***The results sugest the government rent is subsidiczed (close to BB$450). Since we want to take into consideration the actual ***value from the rent, the estimated values would be used for all cases but the ones with reported private rent . COMPUTE house=house12_regresion. IF (house1 > 0) house=house1. VARIABLE LABELS house 'House value from predicted rent or actual private rent/month/household'. EXECUTE. RECODE house1_ex (SYSMIS=0). EXECUTE. COMPUTE house_ex=house1_ex . VARIABLE LABELS house_ex 'Estimated house value from predicted rent or actual private rent/month/household'. EXECUTE. SORT CASES BY hhid(A) . SAVE OUTFILE='e0 house.sav' /COMPRESSED. *************. GET FILE='e0 house.sav'. ***Leave only relevant variables. AGGREGATE /OUTFILE=* /BREAK=hhid hhid_string weight psu stratum hh_size house house_ex /N_BREAK=N. delete variable N_BREAK . SORT CASES BY hhid(A) . SAVE OUTFILE='e1 house.sav' /COMPRESSED. *************. GET FILE='e1 house.sav'. ***************************************************************************************************************************************************. erase file 'delete1.sav'.