{'fraction_non_alphanumeric': 0.03800509124807285, 'fraction_numerical': 0.013050804919149546, 'mean_word_length': 4.890601900739177, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Estimating the Effect of School Water, Sanitation, and Hygiene Improvements on Pupil Health Outcomes

Supplemental Digital Content is available in the text.

(iV) analyses use the randomized assignment variable as an instrument to control for confounding. there are a number of iV frameworks, although some present difficulties in estimation for complex trial designs. 12 the principal stratification framework is easily interpretable based on potential outcomes, but in trials with multiple intervention arms it becomes increasingly complex to identify the principal strata. 12 For example, a three-armed trial (like ours) would have 27 principal strata, and estimation of parameters within each principal stratum requires complex modeling assumptions. the endogenous regressor framework 13 is often used, but can be problematic for binary and count outcomes, like ours. 12 the structural nested model framework, which was first developed by robins 14 and has since been generalized by others, 12,15,16 provides a robust framework allowing it to be used in complex trial designs like ours, which has multiple intervention arms, cluster-level randomization, complex sampling schemes, and a variety of outcome types.
We performed an iV analysis to estimate the causal effects of school-level adherence to water, sanitation, and hygiene interventions on several pupil-level health outcomes, including pupil diarrhea, pupil soil-transmitted helminth infection, and soil-transmitted helminth infection intensity. We hypothesized that the preventive effects of water, sanitation, and hygiene would be more pronounced among schools with better adherence to the intervention.

METHODS
Our data are from a cluster-randomized trial that was designed to assess the impact of school-based water, sanitation, and hygiene interventions on various health and educational outcomes, where the intention-to-treat results for these outcomes have already been reported. 6,7,[17][18][19] the iV results for the diarrhea and soil-transmitted helminth outcomes have not been previously reported, and are the emphasis of this study. the study took place between 2007 and 2009 in 185 rural primary schools in what were formerly four districts of nyanza Province, Kenya-rachuonyo, Suba, nyando, and Kisumu.

School Selection and Randomization
all selection criteria were determined in collaboration with implementing partners and the Kenyan government. an initial survey was sent out to all primary schools in the geographic area (n = 1,084) to assess water, sanitation, and hygiene conditions; 83% of the surveys were returned. Schools in certain administrative divisions and schools with pupil to latrine ratios that already met the government of Kenya standard (25:1 for girls and 30:1 for boys) were ineligible for the study, leaving 289 eligible schools. 20 Schools were then divided into two groups based on whether or not they had an improved water source within 1 km during the dry season, and 135 "water-available" schools and 50 "water-scarce" schools were randomly allocated into study arms using a random number generator, with the allocation stratified by geographic district. the randomization processes in the two water availability study groups were separate. in the water-available group, 135 schools were randomly allocated into three study arms of equal size: (1) the water-available control arm; (2) the hygiene promotion and water treatment arm; and (3) the hygiene promotion and water treatment, plus sanitation improvement arm. in the water-scarce group, 50 schools were randomly allocated into two study arms of equal size: (1) the water-scarce control arm and (2) the hygiene promotion and water treatment, plus sanitation, plus water supply improvement arm. the soil-transmitted helminth study was nested within the larger trial and took place among a randomly selected subset of 39 schools from rachuonyo and nyando/Kisumu that were already taking part in the water-available group of the larger study.
all control schools received the interventions at the end of the study. Further details on the interventions are available elsewhere. 18 it was not possible to mask schools, data collectors, or pupils to the intervention arm to which the school had been randomized.

Pupil Selection
For both the diarrhea and soil-transmitted helminth outcomes, a random sampling scheme was used to select pupils from the school registers, sampling by sex and grade. For the diarrhea outcome, at each of the 185 schools, 25 pupils from grades 4 to 8 were randomly selected to participate in the study. For the soil-transmitted helminth outcomes, at each of the 39 primary schools, 25 pupils, from grades 3 to 5, were randomly selected (distinct from the selection that took place in the diarrhea study). Different children were sampled at the baseline and follow-up visits.

Data Collection
Data were collected by trained enumerators from the great lakes University of Kisumu. enumerators visited the schools unannounced on a randomly selected weekday within the study period. School WaSH characteristics were collected both by direct observation and by structured interviews with head teachers in the english language. Pupils were interviewed about their water, sanitation, and hygiene knowledge, attitudes and practices, and about self-reported health and educational outcomes in the Dholuo language. Baseline data collection took place between February and March of 2007. after randomization and implementation, data for the first follow-up were collected between april and October of 2008.

Outcomes
For the diarrhea study, our outcome of interest was pupil-reported diarrhea (binary), defined as three or more loose or watery stools over any 24-hour period in the previous week. 21 in the diarrhea study, we did not have any missing data due to nonresponse or refusal to participate.
For the soil-transmitted helminth study, all sampled pupils provided stool specimens that were analyzed for A. lumbricoides, Trichuris trichiura, and any species of hookworm using the Kato-Katz method. 22,23 the outcomes of interest were soil-transmitted helminth infection (binary), and secondarily the intensity of infection measured in eggs per gram of feces, both of which were assessed by individual helminth species. all children attending any of the 185 schools received yearly deworming (400 mg of albendazole). in the helminth study, 22 observations were deleted due to nonresponse.

Adherence
We measured adherence to three separate school-level water, sanitation, and hygiene intervention components on the day of the study visit: (1) soap availability, (2) safe water availability, and (3) latrine acceptability. 12 Soap availability was defined as the school having handwashing soap near the latrines for pupil use. Safe water availability was defined as the school either having available water from an improved water source or having available water with detectable chlorine from any source. latrine acceptability was based on the school having an adequate number of latrines that were maintained and structurally intact.
in an "as-treated" analysis, one could compare all eight possible combinations of the above intervention components. For our iV analysis, we needed to reduce the dimensionality of the adherence variable. First, not all of the possible combinations existed, and second, iV analyses only allow as many effect estimates as instruments. 12 We defined adherence by the number of water, sanitation, and hygiene intervention components to which each school adhered. We first created a composite, four-level variable that is the sum of whether or not there was soap available (yes = 1, no = 0), safe water available (yes = 1, no = 0), and acceptable latrines at the school (acceptable = 1, not acceptable = 0). this four-level adherence variable can be used as either a continuous variable or can further be categorized. in the water-scarce schools and in the helminth study, we only had one instrument, and we present results both using the continuous adherence variable and also the dichotomous variable (i.e., adherence to ≥2 components vs. <2). in the wateravailable schools, we had two instruments due to having three randomization arms, so we were able to produce two adherence estimates using a single model (i.e., adherence to 1-2 components vs. 0, and adherence to 3 components vs. 0).

Safety and Confidentiality
institutional review board approval was obtained from the emory University institutional review Board (atlanta, ga). Permission to conduct the trial was also granted by the government of Kenya Ministries of Health, Water and irrigation, and education. Oral assent was obtained from all participants, and approval was also obtained by head teachers of each school in loco parentis.

Analysis Weights
Because this trial was cluster-randomized, individuallevel balance of covariates is not guaranteed by randomization, so we also produced weights (W ij1 ) that were used to remove the association between individual-level confounders and randomization (eappendix 1; http://links.lww.com/eDe/ B70). 12 Diarrhea and soil-transmitted helminths have different mechanisms of infection, and so we collected and controlled for different individual variables in the two studies. Diarrhea is transmitted through a fecal-oral pathway, and for this outcome we used weights to control for pupils' age. Because the helminths under study are soil-transmitted, for these outcomes, we used weights to control for pupils' age, and additionally for pupils' shoe-wearing behavior (important for hookworm), and for geophagy (a soil-eating practice). Sampling weights were also produced to account for the unequal probability of selection of individuals into the study. these weights (W ij2 ) are the inverse of the probability of selection of each pupil into the study. We call the product of these two weights W ij , which is an overall weight that accounts simultaneously for the complex sampling of pupils and for confounding by individual covariates (eappendix 1; http://links.lww.com/eDe/B70). 12

Structural Nested Models
We used a weighted generalized structural nested mean model: 12 represents the potential outcome for the jth pupil in the ith school at some observed adherence level a, A i represents either a categorical or continuous school-level adherence variable, R i represents a categorical school-level randomization variable, E W1 represents a weighted expectation (e.g., using the weight W ij1 ), h represents a link function (e.g., h(p) = p; h(p) = log(p); h(p) = log(p/(1 − p))), and ξ represents a causal effect-for example, a rD, logrr, or logOr corresponding to the link function that was used to transform the left parts of the model. the subscript v (e.g., a v ) denotes a vector function, perhaps when there are several levels of categorical adherence. the structural nested model framework is based on potential outcomes, and conditions on observed adherencethe effect of actually receiving treatment. note that only Y ij (a) is actually observed, whereas the potential outcome Y ij (0) is a counterfactual that is modeled. Potential outcomes under no treatment are observed only in the control and nonadherent clusters, and not observed in adherent clusters. to solve for the structural nested model's causal parameter (i.e., ξ), first, the independence assumption is employed to construct unbiased estimating equations-i.e., equations with mean zero. these estimating equations are then solved using newton-raphson-a method that uses taylor series approximation and an initial guess of ξ and iteratively finds an approximation of ξ. Our method differs from g-estimation, in that g-estimation solves a different estimating equation, and often using a grid search method to do so. the mathematical details of these estimating equations and the iterative algorithm to solve them are summarized in eappendix 1 (http:// links.lww.com/eDe/B70), eappendix 2 (http://links.lww. com/eDe/B71) and elsewhere. 12 researchers using structural nested models often only target the parameter ξ, which is conditional on both A and R, but of particular interest to us, was to calculate a prevalence ratio (Pr) that was conditional only on A. Specifically, the effects of interest for the diarrhea outcome and soil-transmitted helminth infection outcomes were the Prs comparing the prevalence of disease among adherers to what the prevalence of disease would have been had this same group not adhered: this effect is known as the effect of the treatment on the treated in less complex settings. the numerator of interest from the Pr, i.e., E W1 (Y ij (a)|A i = a), is easily calculated without the structural nested model. this can be done, for example, by regressing Y ij on A i in SaS version 9.4 (cary, nc) using PrOc reg (while using the W ij weight) and outputting the "parameter estimates" for each participant. the denominator, E W1 (Y ij (0)|A i = a), is a counterfactual and is calculated from the structural nested model parameters. rather than the causal parameter (i.e., ξ) of particular interest from the structural nested model nator of interest in that it is also conditional on R and also that a link function is applied to it. We can apply the inverse link function (e.g., the expit, or exponential function) to h(E W1 (Y ij (0)|A i = a, R i ) to produce a counterfactual prevalence of disease for each participant in the study. to then make these conditional prevalences marginal on only A, we regress E W1 (Y ij (0)|A i , R i ) on A i , again using PrOc reg (while using the W ij weight) and outputting the parameter estimates. the resulting prevalences, E W1 (Y ij (0)|A i = a), represent that the true potential outcome had a participant's school counterfactually not adhered to the intervention (e.g., had it been assigned to R = 0). the iV parameter of interest (a Pr) is this numerator divided by this denominator. the Pr can be produced for the diarrhea and soil-transmitted helminth infection outcomes (both binary) with the log, logistic, or linear structural nested model. 12 We experimented with all three structural nested models, but chose to use the logistic one as it had the best fit-it was the only one that always produced a solution for each of our relationships of interest. For the soil-transmitted helminth intensity of infection outcomes, which are counts, the iV parameters are calculated similarly, except that log-linear SnM is used, to produce a ratio comparing the average ePg among pupils in adhering schools to what the ePg count would have been had these same schools not adhered.
We used, and make available, SaS programs for the log, logistic, and linear SnMs, which were originally created by Brumback et al. 12 (see eappendix 1; http://links. lww.com/eDe/B70). these SaS programs were used to estimate the Pr and 95% confidence intervals, with only minimal modifications to the original program. Our study was a cluster-randomized trial, where we handled clustering of the individual-level confounders using weights (i.e., W ij1 ), and we handled clustering in the estimation of the variance by assuming schools were independent and jackknifing schools. these SaS programs could also be modified and used for individuallevel trials (or possibly even observational studies that meet the study assumptions), by modifying the weights, and by jackknifing individuals instead of clusters.

Structural Nested Model Assumptions
the validity of the estimates, including the ability of the structural nested model to account for unknown/unmeasured school-level confounding, is dependent upon meeting a number of study assumptions that are described below, and also described in greater detail elsewhere. 12 (1) We assume the exclusion restriction is met, which is that there are no direct effects of randomization assignment on the outcome (see directed acyclic graph in Fig.). this assumption requires that randomization of a school to receive water, sanitation, and hygiene interventions does not directly prevent (or cause) diarrhea/soil-transmitted hygiene infection except through adherence to the intervention. (2) We make the consistency assumption, which is that the observed outcomes are potential outcomes under the treatment/adherence level that was actually received/observed. 24 in our specific study, this means that when we observe school-level adherence at a given level (e.g., a = 3) that this observed adherence is intrinsically linked to a well-defined potential outcome. (3) the structural nested model's effects are based on potential outcomes, with the assumption that potential outcomes are independent of the randomization variable, or in a clusterrandomized trial like ours, that the potential outcomes are independent of the randomization variable, conditional on individual-level baseline covariates. We used weights, as discussed earlier, to remove the association between individuallevel confounders and randomization. in the Figure directed acyclic graph, this weighting would remove the arrow from the individual-level confounders to randomization. (4) We assume the distribution of potential outcomes in our data satisfy a structural nested model. implied in the structural nested model is a no interaction assumption, that ξ, the model's causal effect, is the same within the different randomization groups. if the prevalence or mean of a covariate at a given adherence level is imbalanced across randomization groups, then this assumption requires that the covariate is not an effect modifier of the causal effect of adherence on the outcome. if there are unknown effect modifiers, then this assumption may not be met. However, if effect modifiers are known, the assumption can still be satisfied by stratifying upon them. For example, sex was reported to be an effect modifier of the water, sanitation, and hygiene intervention on soil-transmitted helminth infections 6 so to better meet this assumption, we stratify all the helminth analyses by sex.
We carried out our analyses in SaS version 9.4 (cary, nc). We make available SaS programs for the log, logistic, and linear structural nested models (eappendix 1; http://links. lww.com/eDe/B70), which were obtained from Brumback et al. 12 and modified to allow for variations in our study. the jackknife variance estimation procedure 25 was also built into the SaS program and used to estimate 95% confidence intervals. Further details on both parameter estimation and variance estimation are summarized in eappendix 2 (http://links. lww.com/eDe/B71) and elsewhere. 12

Intention-to-treat Analyses
We compared the intention-to-treat and iV estimates. Ors (not Prs) for the diarrhea, 7 and soil-transmitted helminth infection 6 outcomes had been previously reported. We recalculated all the intention-to-treat estimates using the overall weight (W ij ) to assure that a fair comparison was being made between our intention-to-treat and iV analyses. We used the following model to estimate the Pr for the three-armed trial: µ ij is the expectation of the response variable-binary diarrhea, binary soil-transmitted helminth infection, or a count of helminth eggs per gram of feces. the school-level water, sanitation, and hygiene interventions are represented by dummy variables corresponding to each of the two intervention arms, with the control arm as the referent. in the two-armed trial, only β 1 would be included in the model. the coefficients and 95% confidence intervals were produced using survey procedures in SaS-callable SUDaan version 11.0.1. (research triangle Park, nc) and reflect disproportionate sampling of pupils within schools, the clustering of pupils within schools, and the stratified randomization by geographical districts.

Baseline Characteristics
Baseline descriptive statistics, by randomization arm, are shown in table 1. We generally had balance of school-level and individual-level covariates between the intervention arms.

Water, Sanitation, and Hygiene Intervention Adherence
School-level adherence to the interventions at the first follow-up is shown in table 2. in each of the three study groups, we observed that the schools allocated into the intervention arms adhered to more intervention components than schools allocated into the control arms. although we observed an increase in the level of adherence in all intervention arms across the study, we also observed that only 29 schools fully adhered to all three water, sanitation, and hygiene components.

Diarrhea
Using the categorical adherence variable, we observed that increased adherence to two or more intervention components was associated with a reduced prevalence of diarrhea (Pr = 0.28, 95% ci: 0.10, 0.75; table 3). When using the continuous adherence variable, pupils attending water-scarce schools that adhered to two of the components had a reduced prevalence of diarrhea prevalence compared with what the diarrhea prevalence would have been had the same schools not adhered to any intervention components (Pr = 0.27, 95% ci: 0.11, 0.69; table 3). the contrast comparing perfectly adhering schools to nonadhering schools (using the same ξ from the structural nested model above using a continuous adherence variable, but for a three-unit change) revealed a strong but extremely imprecise estimate (Pr = 0.094, 95% ci: 0.0043, 2.1). For comparison, the intention-to-treat effect, which compares all water-scarce intervention schools to all water-scarce control schools without regard to intervention adherence, was Pr = 0.38 (95% ci: 0.20, 0.73).
in the water-available schools, the Pr for pupils in schools that adhered to all three water, sanitation, and hygiene components was 0.71 (95% ci: 0.22, 2.4; table 3), and the Pr for pupils in schools adhering to either one or two components was 1.9 (95% ci: 0.12, 29). Both effects had wide confidence intervals.

Soil-transmitted Helminth Infection Intensity
the direction and strength of the Prs for the soil-transmitted helminth intensity outcomes often mirrored the pattern that we observed for the helminth infection outcomes, although the confidence intervals were always much wider for the helminth intensity outcomes (etable 2; http://links.lww. com/eDe/B73).

DISCUSSION
Our study used an iV analysis to estimate the effect of actual water, sanitation, and hygiene intervention adherenceas opposed to the effect of randomization-on pupil diarrhea and pupil soil-transmitted helminth infection. Our iV results from the water-scarce schools suggested a strong preventive effect of adherence to interventions on reducing pupils' diarrhea, whereas results were less clear in water-available schools and in the soil-transmitted helminth subset of schools.
imperfect adherence may be one reason why this and other previous school water, sanitation, and hygiene trials have not provided strong evidence of the efficacy of schoolbased programs for the prevention of diarrheal disease and soil-transmitted helminth infections. 5-7 the strong preventive point estimates that we often observed with increasing adherence lend to the theory that adherence may be an important factor in previous trials' mixed results. However, the confidence intervals were often wide, and in the presence of such imprecision, stronger estimates may actually contain less information. 26 it was encouraging that with the "continuous adherence iV model," both the iV Pr and its upper bound were further from the null than the intention-to-treat model Pr and its upper bound, respectively (adherence to 2 components vs. 0 components from table 3).
the null iV results for several of the outcomes is suggestive that there are also probably a number of other Schools without a water source within 1 km during the dry season were classified as "water scarce" and all other schools were classified as "water available." b We did not have the ability to assess the baseline prevalence of diarrhea using the same variable due to a data collection device error, 7 so here we show the prevalence for parentreported diarrhea instead. c a proxy of school wealth. d the helminth study took place within only a subset of the schools from the larger trial, which were participating in either the HP & Wt + San arm or the control arm from the water-available group.
HP & Wt indicates hygiene promotion and water treatment; San, sanitation; Wat, water supply.
factors, besides adherence, that are important in reducing these infectious diseases. it is not clear why our results were so different in water-scarce versus water-available schools. One possibility is that the water, sanitation, and hygiene interventions in the water-scarce schools were more comprehensive, notably including a community-level water source. it may be that this access to water was a final sufficient component that allowed individuals to practice water, sanitation, and hygiene activities both at school, and possibly also at home and elsewhere in the community. it also may be that the water source intervention simply provided better access to microbiologically safe water. We made several efforts to best meet the study assumptions, including using the structural nested model with the best fit, stratifying upon known effect modifiers, and thoughtfully specifying individual-level confounders. We do believe that the iV study assumptions could be plausibly met; however, some assumptions are untestable. Further methods n/a n/a 1 WaSH component implemented 11 (58%) n/a c 5 (26%) n/a c n/a c 2 WaSH components implemented 0 (0%) n/a c 6 (32%) n/a c n/a c 3 WaSH components implemented 0 (0%) n/a c 5 (26%) n/a c n/a c WaSH component combinations none 8 (42%) n/a c 3 (16%) n/a c n/a c latrines acceptable 11 (58%) n/a c 2 (11%) n/a c n/a c Safe water available 0 (0%) n/a c 3 (16%) n/a c n/a c Soap available 0 (0%) n/a c 0 (0%) n/a c n/a c latrines + safe water 0 (0%) n/a c 3 (16%) n/a c n/a c latrines + soap 0 (0%) n/a c 0 (0%) n/a c n/a c Safe water + soap 0 (0%) n/a c 3 (16%) n/a c n/a c latrines + safe water + soap 0 (0%) n/a c 5 (26%) n/a c n/a c a development might be merited to evaluate these assumptions in this complex trial settings. Our study is not without limitations. Our inability to blind water, sanitation, and hygiene interventions and our need to reduce the dimensionality of adherence due to only having two instruments could impair our ability to meet the exclusion restriction assumption. Furthermore, the continuous adherence structure necessitates an assumption of a linear relationship between adherence and the outcome on either the logit or log scale. there is also the possibility of unknown individual-level confounders, or unknown effect modifiers that we may not have accounted for. Finally, stratification by sex in the soil-transmitted helminth study possibly exaggerates the problem of wide confidence intervals that is already inherent to many iV analyses. 27,28  the itt analysis compares all intervention schools (numerator) to all control schools (denominator). b the iV analysis compares pupils' diarrhea prevalence in schools that adhered at a given level (numerator), to the what the prevalence would have been in those same schools had the schools adhered at the referent level (denominator). adherence was defined by the number of WaSH components to which each school adhered. c Schools without a water source within 1 km during the dry season were classified as "water scarce" and all other schools were classified as "water available." d the two-arm trial has a single instrument, so we are constrained to produce a single estimate per model. the three arm trial has two instruments so we can calculate two estimates using a single model.
HP & Wt indicates hygiene promotion and water treatment; itt, intention-to-treat; San, sanitation; WaSH, water, sanitation, and hygiene; Wat, water supply.