One of the main limitations of the ecological design is aggregation bias. The problem can be addressed by designs that use small contextual hierarchical units with internal homogeneity. This study aimed to compare different geographic data structures in order to explore contextual effects of socioeconomic variables on the odds of perceived poor oral health. The analyses were based on a mixed design that included data from civil servants participating in the "Pró-Saúde" censuses I and II and residing in the city of Rio de Janeiro, Brazil, in 1999 (n = 2,426); contextual data were obtained from the National Demographic Census conducted in 1991. We used the variance partition coefficient to compare different geographic hierarchical structures. In this study, the smallest geographic partition (census tract) was the best unit for contextual analysis for studying variability in perceived poor oral health. Individual socioeconomic attributes explained more of the variance in perceived oral health than did the socioeconomic contexts of residential areas.