This paper presents a maximum likelihood panel test of the cointegrating rank in heterogeneous panel models based on the mean of the individual rank trace statistics. The existence of the first two moments of the asymptotic distribution of the individual trace statistic is established. Based on this, the asymptotic distribution of the test statistic is shown to be normal. The small-sample size and power properties are investigated using Monte Carlo simulations. An empirical example for a consumption model including consumption, income and inflation is estimated for 23 OECD countries over the period 19601994. The results indicate that two cointegrating relations exist in the system: one containing consumption and income and one inflation only.