Fixed a bug with using db.q: needs nrows parameter
Produce the correct regression model with dummies

Sometimes n dummies are needed, but usually only n-1 dummies are needed.

Use model.matrix and fake.data trick to analyze the formula and decide
how many dummies are needed.