Generalised estimating equations enable one to estimate regression paramete
rs consistently in longitudinal data analysis even when the correlation str
ucture is misspecified. However, under such misspecification, the estimator
of the regression parameter can be inefficient. In this paper we introduce
a method of quadratic inference functions that does not involve direct est
imation of the correlation parameter, and that remains,optimal even if the
working correlation structure is misspecified. The idea is to represent the
inverse of the working correlation matrix by the linear combination of bas
is matrices, a representation that is valid for the working correlations mo
st commonly used. Both asymptotic theory and simulation show that under mis
specified working assumptions these estimators are more efficient than esti
mators from generalised estimating equations. This approach also provides a
chi-squared inference function for testing nested models and a chi-squared
regression misspecification test. Furthermore, the test statistic follows
a chi-squared distribution asymptotically whether or not the working correl
ation structure is correctly specified.