The use of logistic models for independent binary data has relied first on asymptotic theory and later on exact distributions for small samples. However, the use of logistic models for dependent analysis based on exact analysis is not as common. Moreover, attention is usually given to one-stage clustering. In this paper, we extend the exact techniques to address hypothesis testing (estimation is not addressed) for data with second-stage and probably higher levels of clustering. The methods are demonstrated through a somewhat generic example using mathrmC+ + program. Copyright © 2011 John Wiley & Sons, Ltd.