Hierarchical relationships between risk factors are seldom taken into account in epidemiological studies though some authors stressed the importance of doing so, and proposed a conceptual framework in which each level of the hierarchy is modeled separately. The objective of this paper was to implement a simple version of their framework, and to propose an alternative procedure based on a Bayesian Network (BN). These approaches were illustrated in modeling the risk of diarrhea infection for 2740 children aged 0 to 59 months in Cameroon. The authors implemented a (naïve) logistic regression, a step-level logistic regression and also a BN. While the first approach is inadequate, the two others approaches both account for the hierarchical structure but to different estimates and interpretations. BN implementation showed that a child in a family in the poorest group has respectively 89%, 40% and 18% probabilities of having poor sanitation, being malnourished and having diarrhea. An advantage of the latter approach is that it enables one to determine the probability that a risk factor (and/or the outcome) is in a given state, given the states of the others. Although the BN considered here is very simple, the method can deal with more complicated models.