///////KINDERGARTEN STUDY/////// *** CODE TO REPRODUCE ALL MAIN AND SUPPLEMENTARY TABLES *** // Two datasets needed: // ~/WISE_KG_study_pupil_dataset_WIDE.dta (pupil-level wide dataset - one row per pupil) // ~/WISE_KG_study_school_dataset.dta (school-level dataset - one row per school) //------------------------------------------------------------------------------// ** Table 1 - Characteristics of Pupils/Caregivers and Schools ** //------------------------------------------------------------------------------// * Characteristics of pupils and caregivers * use WISE_KG_study_pupil_dataset_WIDE, clear 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) tab arm // total eligible pupils in each arm tabstat pupil_age, by(arm) s(mean sd) tab pupil_gender arm, col tabstat caregiver_age, by(arm) s(mean sd) tab caregiver_gender arm, col tab caregiver_relation arm, col tab caregiver_education arm, col tabstat travel_time, by(arm) s(p50 p25 p75) tabstat hh_members, by(arm) s(p50 p25 p75) tab water_basic arm, col tab treatment_none arm, col tab sanitation_basic arm, col tab hygiene_basic arm, col * Characteristics of schools * use WISE_KG_study_school_dataset, clear keep if provided_contacts==1 // restrict analysis to schools that provided caregiver contacts for participant enrolment tab arm // total schools providing outcome data in each arm tab strata arm, col tabstat total_pupils_KG, by(arm) s(p50 p25 p75) tabstat gender_parity_KG, by(arm) s(mean sd) tabstat class_size_KG, by(arm) s(mean sd) //------------------------------------------------------------------------------// ** Table 2 - Intervention Effects on Primary Outcomes ** //------------------------------------------------------------------------------// * Group-level means * use WISE_KG_study_pupil_dataset_WIDE, clear 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) tabstat absent_prop, by(arm) s(n mean sd) // pupils contributing data and mean outcome in each arm tabstat diar_prop, by(arm) s(n mean sd) tabstat resp_prop, by(arm) s(n mean sd) * Effect size estimation – primary analysis * meglm days_absent i.arm i.strata || school_ID:, family(binomial school_days) or // primary analysis estat icc // estimated intracluster correlation coefficient meglm days_diar i.arm i.strata || school_ID:, family(binomial total_days) or estat icc meglm days_resp i.arm i.strata || school_ID:, family(binomial total_days) or estat icc * Effect size estimation – further adjusted models * meglm days_absent i.arm i.strata i.pupil_gender pupil_age || school_ID:, family(binomial school_days) or // further adjusted for age and gender meglm days_diar i.arm i.strata i.pupil_gender pupil_age || school_ID:, family(binomial total_days) or meglm days_resp i.arm i.strata i.pupil_gender pupil_age || school_ID:, family(binomial total_days) or //------------------------------------------------------------------------------// ** Other Statistics Reported In-Text ** //------------------------------------------------------------------------------// * Subgroup analysis * use WISE_KG_study_pupil_dataset_WIDE, clear 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) meglm days_absent i.arm##i.pupil_gender i.strata || school_ID:, family(binomial school_days) or // group-gender interaction p=0.41 meglm days_diar i.arm##i.pupil_gender i.strata || school_ID:, family(binomial total_days) or // group-gender interaction p<0.001 meglm days_resp i.arm##i.pupil_gender i.strata || school_ID:, family(binomial total_days) or // group-gender interaction p=0.008 //------------------------------------------------------------------------------// ** Supplementary Table 1 - Analysis of Means ** //------------------------------------------------------------------------------// use WISE_KG_study_pupil_dataset_WIDE, clear 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) tabstat absent_prop, by(arm) s(n mean sd) // pupils contributing data and mean outcome in each arm meglm absent_prop i.arm i.strata || school_ID:, family(gaussian) // primary analysis estat icc // estimated intracluster correlation coefficient tabstat diar_prop, by(arm) s(n mean sd) meglm diar_prop i.arm i.strata || school_ID:, family(gaussian) estat icc tabstat resp_prop, by(arm) s(n mean sd) meglm resp_prop i.arm i.strata || school_ID:, family(gaussian) estat icc //------------------------------------------------------------------------------// ** Supplementary Table 2 - Sensitivity Analysis ** //------------------------------------------------------------------------------// use WISE_KG_study_pupil_dataset_WIDE, clear 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) meglm days_absent i.arm i.strata || school_ID:, family(binomial school_days) or // primary analysis, as above meglm days_diar i.arm i.strata || school_ID:, family(binomial total_days) or meglm days_resp i.arm i.strata || school_ID:, family(binomial total_days) or use WISE_KG_study_pupil_dataset_WIDE, clear keep if completed_1==1 // restrict analysis to pupils enrolled in the study (successfully completed call 1), now with no age restrictions meglm days_absent i.arm i.strata || school_ID:, family(binomial school_days) or // primary analysis with no age restrictions meglm days_diar i.arm i.strata || school_ID:, family(binomial total_days) or meglm days_resp i.arm i.strata || school_ID:, family(binomial total_days) or