The use of martingale residuals have been proposed for model checking and also to get a non-parametric estimate of the effect of an explanatory variable. We apply this approach to an epidemiological problem which presents two characteristics: the data are left truncated due to delayed entry in the cohort; the data are grouped into geographical units (parishes). This grouping suggests a natural way of smoothing the graph of residuals which is to compute the sum of the residuals for each parish. It is also natural to present a graph with standardized residuals. We derive the variances of the estimated residuals for left truncated data which allows computing the standardized residuals. This method is applied to the study of dementia in a cohort of old people, and to the possible effect of the concentration of aluminum and silica in drinking water on the risk of developing dementia.