One way to see if one or more variables are dropped is by counting the
number of rows in the e(b) matrix and compare it with the number of
variables + constant if no variable is dropped like in the example
below:
I noticed two problems with Maarten's code below -- although in this
particular case the "correct" answer would be returned. First, to
count the number of variables in the varlist local macro, `varlist'
needs to be quoted in the -local : word count- extended macro command.
(Without the quotes, the answer will always be 1, so `allk' will always
be 2.) Second, the number of regressors will be the number of columns
of e(b), not rows. (In this case, e(b) is 1 x 4, so rowsof(b) = 1,
whereas colsof(b) = 4).