In this talk, I will provide an overview of using the quadratic inference function for analyzing longitudinal or clustered data, where a working covariance matrix is used to weight the contribution of moment conditions from cluster data. Provided that the fixed effect part of the model is correctly specified, the estimates are consistent regardless of the choice of the weighting matrix. However, we can gain estimation efficiency if the working covariance matrix approximates the actual covariance of the observation-wise residuals sufficiently well. The working covariance matrix can be represented by a linear combination of several known basis matrices with a small number of parameters to increase the asymptotic efficiency of the fixed-effect estimation. In addition, I will show how the method works for non-ignorable missing data which arise frequently in survey research.