///////KINDERGARTEN STUDY////// *** PARTICIPANT FLOW-CHART - PUPIL-LEVEL WIDE DATASET *** use WISE_KG_study_pupil_dataset_WIDE, clear ** Call 1 (enrolment) ** tab arm // number of contacts attempted by arm preserve bysort school_ID: egen school_total=max(_n) bysort school_ID: keep if _n==1 tabstat school_total, by(arm) s(p50 p25 p75) // median (IQR) school-level total contacts attempted restore tab completed_1 arm // number of participants enrolled (completed call 1) by arm tab reason_not_1 arm // reasons call 1 not completed by arm tab eligible arm // pupils eligible and ineligible by arm keep if eligible==1 & completed_1==1 // restrict analysis to pupils eligible by age (aged 3–6) and enrolled in the study (successfully completed call 1) preserve bysort school_ID: egen school_total=max(_n) bysort school_ID: keep if _n==1 tabstat school_total, by(arm) s(p50 p25 p75) // median (IQR) school-level total eligible pupils enrolled restore ** Call 2 ** tab completed_2 arm // number of participants who completed call 2 by arm tab reason_not_2 arm // reasons call 2 not completed by arm keep if completed_2==1 preserve bysort school_ID: egen school_total=max(_n) bysort school_ID: keep if _n==1 tabstat school_total, by(arm) s(p50 p25 p75) // median (IQR) school-level total eligible pupils who completed call 2 restore ** Call 3 ** tab completed_3 arm // number of participants who completed call 3 by arm tab reason_not_3 arm // reasons call 3 not completed by arm keep if completed_3==1 preserve bysort school_ID: egen school_total=max(_n) bysort school_ID: keep if _n==1 tabstat school_total, by(arm) s(p50 p25 p75) // median (IQR) school-level total eligible pupils who completed call 3 restore ** Call 4 ** tab completed_4 arm // number of participants who completed call 4 by arm tab reason_not_4 arm // reasons call 4 not completed by arm keep if completed_4==1 preserve bysort school_ID: egen school_total=max(_n) bysort school_ID: keep if _n==1 tabstat school_total, by(arm) s(p50 p25 p75) // median (IQR) school-level total eligible pupils who completed call 4 restore