Conventional least-squares regression can lead to misleading results if the data have a hierarchical structure. An appropriate linear model is presented for such data. The model has conventional regression, variance-component, and random coefficient models as special cases and may be calibrated by use of recently available software. The effectiveness of the model is demonstrated by an analysis of earnings in the engineering industry. Particular attention is given to the problems of interpreting the parameter estimates and residuals.