and \hat {g}_{i} \equiv g(X_i' \hat {\beta}_{r}, where g(\cdot) = G' (\cdot) . Then run the OLS regression \frac {\hat {u}_{i}} {\sqrt{(\hat {G}_{i}(1-\hat {G}_{i}) }} on \frac {\hat {g}_{i}} {\sqrt{(\hat {G}_{i}(1-\hat {G}_{i}) }}X_{1i}', \frac {\hat {g}_{i}} {\sqrt{(\hat {G}_{i}(1-\hat {G}_{i}) }}X_{2i}' , where X_i = [X_{1i} ; X_{2i} ] and X_{2i}\varepsilon R^Q . The LM statistic is equal to the explained sum of squares from this regression Wooldridge, J. (2002): Econometric Analysis of Cross Section and Panel Data, MIT Press, Cambridge, Mass. and it is asymptotically distributed as X_Q^2 . If the MLE can be computed easily under both of the restricted and unrestricted models, Likelihood-ratio test is also a choice: let L_u denote the value of the log-likelihood function under the unrestricted model and let L_r denote the value under the restricted model, then 2(L_u - L_r) has an asymptotic X_Q^2 distribution.
