*------------------------------------------------------------------------------* * Kovocs et al. 2021 * Lancet Global Health * Socioeconomic inequalities in the quality of primary care * under Brazil’s national pay-for-performance programme: a longitudinal study of family health teams *------------------------------------------------------------------------------* ***** * Data access ***** * The data used in this study are owned by the Ministry of Health of Brazil, which should be contacted by those who wish to use the data * This do-file provides the code used to create figures and tables shown in the paper ***** * Overview ***** * To produce the dataset used here the following sources of data were combined: * Family health-team level data on the PMAQ score (Provided by the MOH) * Data on basic facility characteristics (PMAQ external evaluation module 1) - matched with family health teams via CNES core * Data on census sector characteristics, including census sector polygons (2010 population census) - matched with family health teams based on GIS location *------------------------------------------------------------------------------* *------------------------------------------------------------------------------* * Table 2 -Sample description *------------------------------------------------------------------------------* *Read in dataset *Teams sum score_c1 score_c2 score_c3 pmaq_c3_c1 if panel &!missing(income_1000) sum score_c1 score_c2 score_c3 pmaq_c3_c1 if panel &!missing(income_1000), det *Facilities preserve drop if panel==0 duplicates drop cnes, force tab1 type_bn1 type_bn2 type_bn3 if !missing(income_1000) sum type_bn1 type_bn2 type_bn3 staff_total if !missing(income_1000) sum type_bn1 type_bn2 type_bn3 staff_total if !missing(income_1000) , det restore *Census sectors preserve drop if panel==0 duplicates drop cod_setor, force sum income_1000 prop_under5 prop_over50 if !missing(income_1000) sum income_1000 prop_under5 prop_over50 if !missing(income_1000), det restore *------------------------------------------------------------------------------* * Table 3 -Association between PMAQ score and census area income *------------------------------------------------------------------------------* *set globals global c_controls "prop_under5 prop_over50" global f_controls "i.type staff_total" *Regress census income on PMAQ score forvalues i =1/3 { reg score_c`i' income_1000 $c_controls $f_controls if panel==1 , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_cont.doc", dec(4) ctitle(`var') pdec(4) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen } reg pmaq_c3_c1 income_1000 $c_controls $f_controls if panel==1 , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_cont.doc", dec(4) ctitle(`var') pdec(4) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen *------------------------------------------------------------------------------* * Figure 1 - PMAQ score by ventile (20 groups) of local area household income *------------------------------------------------------------------------------* * Census income bins bysort income_20_c: egen mean_c1 = mean(score_c1) if panel bysort income_20_c: egen mean_c2 = mean(score_c2) if panel bysort income_20_c: egen mean_c3 = mean(score_c3) if panel bysort income_20_c: egen mean_diff = mean(pmaq_c3_c1) if panel scatter mean_c1 income_20_c if panel, title(Round 1 (Nov 2011 – Mar 2013), size(vlarge)) ytitle(Mean PMAQ score, size(large)) xtitle(Area income ventile, size(large)) msize(large) ylab(40(5)80) saving(income_1, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c2 income_20_c if panel, title(Round 2 (Apr 2013 – Sept 2015) , size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area income ventile, size(large)) msize(large) ylab(40(5)80) saving(income_2, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c3 income_20_c if panel, title(Round 3 (Oct 2015 – Dec 2019), size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area income ventile, size(large)) msize(large) ylab(40(5)80) saving(income_3, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_diff income_20_c if panel, title(Difference (R3 - R1) , size(vlarge)) ytitle(Mean PMAQ score difference , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(-20(5)20) saving(income_4, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) graph combine income_1.gph income_2.gph income_3.gph income_4.gph, rows(1) scheme(plottig) *------------------------------------------------------------------------------* * Appendix *------------------------------------------------------------------------------* **** ** Figure A2: Structural quality of care index by ventile (20 groups) of mean monthly household income of local area **** *PMAQ score by income BIN bysort income_20_c: egen mean_str_c1 = mean(structural_qoc_c1) if panel_ses_mod bysort income_20_c: egen mean_str_c2 = mean(structural_qoc_c2) if panel_ses_mod bysort income_20_c: egen mean_str_c3 = mean(structural_qoc_c3) if panel_ses_mod bysort income_20_c: egen mean_str_diff = mean(structural_qoc_c3_c1) if panel_ses_mod *Combined graph scatter mean_str_c1 income_20_c if panel_ses_mod , title(Round 1 (Nov 2011 – Mar 2013), size(vlarge)) ytitle(Mean structural quality, size(large)) xtitle(Area income ventile, size(large)) msize(large) ylab(40(5)80) saving(income_1, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_str_c2 income_20_c if panel_ses_mod , title(Round 2 (Apr 2013 – Sept 2015) , size(vlarge)) ytitle(Mean structural quality , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(40(5)80) saving(income_2, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_str_c3 income_20_c if panel_ses_mod , title(Round 3 (Oct 2015 – Dec 2019), size(vlarge)) ytitle(Mean structural quality , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(40(5)80) saving(income_3, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_str_diff income_20_c if panel_ses_mod , title(Difference (R3 - R1) , size(vlarge)) ytitle(Mean structural quality difference , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(-20(5)20) saving(income_4, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) **** ** Figure A3: PMAQ score by ventile (20 groups) of vulnerability index of local area **** bysort index_20: egen mean_c1_index = mean(score_c1) if panel bysort index_20: egen mean_c2_index = mean(score_c2) if panel bysort index_20: egen mean_c3_index = mean(score_c3) if panel bysort index_20: egen mean_diff_index = mean(pmaq_c3_c1) if panel scatter mean_c1_index index_20 if panel , title(Round 1 (Nov 2011 – Mar 2013), size(vlarge)) ytitle(Mean PMAQ score, size(large)) xtitle(Area SES ventile, size(large)) msize(large) ylab(40(5)80) saving(income_1, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c2_index index_20 if panel , title(Round 2 (Apr 2013 – Sept 2015), size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area SES ventile , size(large)) msize(large) ylab(40(5)80) saving(income_2, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c3_index index_20 if panel , title(Round 3 (Oct 2015 – Dec 2019), size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area SES ventile , size(large)) msize(large) ylab(40(5)80) saving(income_3, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_diff_index index_20 if panel , title(Difference (R3 - R1) , size(vlarge)) ytitle(Mean PMAQ score difference , size(large)) xtitle(Area SES ventile , size(large)) msize(large) ylab(-20(5)20) saving(income_4, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) **** ** Figure A4: PMAQ score by ventile (20 groups) of mean monthly household income of local area for all family health teams **** bysort income_20_c: egen mean_c1 = mean(score_c1) bysort income_20_c: egen mean_c2 = mean(score_c2) bysort income_20_c: egen mean_c3 = mean(score_c3) bysort income_20_c: egen mean_diff = mean(pmaq_c3_c1) scatter mean_c1 income_20_c , title(Round 1 (Nov 2011 – Mar 2013), size(vlarge)) ytitle(Mean PMAQ score, size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(40(5)80) saving(income_1, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c2 income_20_c , title(Round 2 (Apr 2013 – Sept 2015), size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(40(5)80) saving(income_2, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_c3 income_20_c , title(Round 3 (Oct 2015 – Dec 2019), size(vlarge)) ytitle(Mean PMAQ score , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(40(5)80) saving(income_3, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) scatter mean_diff income_20_c , title(Difference (R3 - R1) , size(vlarge)) ytitle(Mean PMAQ score difference , size(large)) xtitle(Area income ventile , size(large)) msize(large) ylab(-20(5)20) saving(income_4, replace) scheme(plottig) xsize(2.3) xlabel(,labsize(medlarge)) ylabel(,labsize(medlarge)) *graph combine income_1.gph income_2.gph income_3.gph income_4.gph, rows(1) scheme(plottig) *------------------------------------------------------------------------------* **** ** Table A1: Source of geographical variation in PMAQ performance **** loneway score_c1 uf if panel==1 scalar c1_state_with=(r(sd_w))^2 scalar c1_state_btwn=(r(sd_b))^2 scalar c1_tot=c1_state_with+c1_state_btwn scalar c1_state_btwn_pc=c1_state_btwn/c1_tot loneway score_c1 municipality if panel==1 scalar c1_munic_with=(r(sd_w))^2 scalar c1_munic_with_pc=c1_munic_with/c1_tot scalar c1_with_btwn_pc=1-c1_munic_with_pc-c1_state_btwn_pc loneway score_c2 uf if panel==1 scalar c2_state_with=(r(sd_w))^2 scalar c2_state_btwn=(r(sd_b))^2 scalar c2_tot=c2_state_with+c2_state_btwn scalar c2_state_btwn_pc=c2_state_btwn/c2_tot loneway score_c2 municipality if panel==1 scalar c2_munic_with=(r(sd_w))^2 scalar c2_munic_with_pc=c2_munic_with/c2_tot scalar c2_with_btwn_pc=1-c2_munic_with_pc-c2_state_btwn_pc loneway score_c3 uf if panel==1 scalar c3_state_with=(r(sd_w))^2 scalar c3_state_btwn=(r(sd_b))^2 scalar c3_tot=c3_state_with+c3_state_btwn scalar c3_state_btwn_pc=c3_state_btwn/c3_tot loneway score_c3 municipality if panel==1 scalar c3_munic_with=(r(sd_w))^2 scalar c3_munic_with_pc=c3_munic_with/c3_tot scalar c3_with_btwn_pc=1-c3_munic_with_pc-c3_state_btwn_pc loneway pmaq_c3_c1 uf if panel==1 scalar c13_state_with=(r(sd_w))^2 scalar c13_state_btwn=(r(sd_b))^2 scalar c13_tot=c13_state_with+c13_state_btwn scalar c13_state_btwn_pc=c13_state_btwn/c13_tot loneway pmaq_c3_c1 municipality if panel==1 scalar c13_munic_with=(r(sd_w))^2 scalar c13_munic_with_pc=c13_munic_with/c13_tot scalar c13_with_btwn_pc=1-c13_munic_with_pc-c13_state_btwn_pc scalar list c1_state_btwn_pc c1_with_btwn_pc c1_munic_with_pc scalar list c2_state_btwn_pc c2_with_btwn_pc c2_munic_with_pc scalar list c3_state_btwn_pc c3_with_btwn_pc c3_munic_with_pc scalar list c13_state_btwn_pc c13_with_btwn_pc c13_munic_with_pc **** ** Table A2: Descriptive statistics of structural quality index **** sum structural_qoc_c* if tag_cnes **** ** Table A3: Census area monthly household income **** sum income_hh if census_other==1 sum income_hh if census_other==1, det **** ** Table A4: Structural quality index of facilities based on average monthly household income of the local area in (R$ 1,000) **** *Structural forvalues i = 1/3 { reg structural_qoc_c`i' income_1000 $c_controls $f_controls if panel_ses_mod==1 & tag_cnes==1 , cluster(cod_setor) outreg2 using "$out\IQ_str_cont.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen } reg structural_qoc_c3_c1 income_1000 $c_controls $f_controls if panel_ses_mod==1 & tag_cnes==1 , cluster(cod_setor) outreg2 using "$out\IQ_str_cont.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen **** ** Table A5: Association between PMAQ score and census area income for all family health teams **** cd "$out" *PMAQ score forvalues i =1/3 { reg score_c`i' income_1000 $c_controls $f_controls , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_all.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen } reg pmaq_c3_c1 income_1000 $c_controls $f_controls , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_all.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen **** ** Table A6: PMAQ score of family health teams based on vulnerability index of local area **** cd "$out" *PMAQ score forvalues i =1/3 { reg score_c`i' index_std $c_controls $f_controls if panel==1 , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_ses.doc", dec(2) ctitle(`var') pdec(3) keep(index_std $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen } reg pmaq_c3_c1 index_std $c_controls $f_controls if panel==1 , cluster(cod_setor) outreg2 using "$out\IQ_pmaq_ses.doc", dec(2) ctitle(`var') pdec(3) keep(index_std $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen **** ** Table A7: Association between PMAQ score and census area income for all family health teams with municipality fixed effects **** cd "$out" encode municipality, gen(mun_id) xtset mun_id forvalues i =1/3 { xtreg score_c`i' income_1000 $c_controls $f_controls if panel==1 , fe outreg2 using "$out\IQ_pmaq_mun_FE.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen } xtreg pmaq_c3_c1 income_1000 $c_controls $f_controls if panel==1 , fe outreg2 using "$out\IQ_pmaq_mun_FE.doc", dec(2) ctitle(`var') pdec(3) keep(income_1000 $c_controls $f_controls) stats(coef ci pval) noaster sideway noparen