Multiple linear restrictions


I need to do an f test to compare a restricted and unrestricted models from an OLS. The issue is that there is some missing data, so I wind up with different numbers of observations. So then I can't do the test. How do I limit what observations stata regressed on when then missing entries aren't in the regression command.

Thank you so much


Let's say the variables containing the missing data are called var1, var2 & var3
You just use:
regress y x1 x2 x3 ... if !missing(var1, var2, var3)