This is a study of the cognitive function of Indonesian children. The cognitive function assessment consisted of 17 items and the number of correct answers a child could score therefore ranged between 0 and 17. In this upper bounded situation, a zero-inflated binomial model and a zero-inflated beta–binomial model were considered. The purpose of the analysis was to examine whether the growth status in infancy and at the age of 7 years was related to the cognitive function of the children. The four regression models proposed by Lucas, Fewtrell and Cole were fitted, i.e. an ‘early model’ relating early body size to the outcome, a ‘later model’ relating later body size to the outcome, a ‘combined model’ including both early and later anthropometry measures, and an ‘interaction model’ further including an interaction term calculated as the product of early and later body size. It was found that social variables predicted the probability of zero-inflation, while weight-for-age at 7 years predicted the proportion of correct answers. The results do not support the existence of a critical window of cognitive development in infancy. Rather they suggest that it is the lack of catch-up growth after poor growth in infancy that is hazardous, and that childhood weight gain is influential regardless of weight in infancy. Copyright © 2005 John Wiley & Sons, Ltd.