We propose a semi-parametric approach to heterogeneous dynamic panel data modelling. The method generalizes existing approaches to model cross-section homogeneity within such panels. It allows for partial influence of other cross-section units on estimated coefficients, differentiating between short- run and long-run homogeneity, and determines the optimal degree of such homogeneity. The issue of cross-section homogeneity emerges as a special case of categorical conditioning. Applying our model to equilibrium exchange rate determination in a cross-country panel, we find evidence of largely heterogeneous adjustment and more homogeneous long-run coefficients across countries. The coefficient heterogeneity appears largely idiosyncratic and is not captured by simple categorizations like exchange rate regime classification.