I am trying to compute the sandwich estimate of variance for a two-stage model where the second-stage model uses as one of its regressors the predicted values from the first-stage model. I followed the procedure in James Hardin's Stata Journal (2:3, pp253-266) article on robust variance estimator except that the estimating equations are derived from F.O.C.s of OLS rather than from derivatives of the log-likelihoods.
I am able to obtain the components of the A & B matrices in Hardin's article mathematically, but cannot implement it correctly in Stata. It seems that I cannot do it without using "mkmat" command which limits the dimension of matrices to 800. Is there any idea to get around the problem of small matrix size? Has anybody calculate the sandwich estimate of variance this way? Could you share with me your thoughts?
Thanks a lot.
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/