# How many dummy variables should I use?

I have data of four different regions that will be made into dummies. The problem is one of the regions only has one observation. The others have 30-50 observations. Is it ok to do a multiple regression with 4-1=3 dummies, leaving out only the region with one observation? Or do I also need to leave out another dummy?

• Can you provide more context about what you are trying to do with the data? Dec 12, 2020 at 18:07
• I'm analyzing the purchases of some companies and factors (location, revenue, change in profit etc) affecting these purchases. Dec 13, 2020 at 8:49
• Are you intending to do prediction (you don't care about the rigor and interpreting the "effects" or coefficients of each variable), or inference (you do want to be able to)? Dec 13, 2020 at 16:56
• It seems to be inference I'm doing Dec 14, 2020 at 8:35
• Do you care about the coefficients on the dummies? Dec 15, 2020 at 5:04

If a dummy variable regressor is equal to one for only a single observation (a singleton dummy), then the OLS estimates of the regression coefficients are identical to those that would be obtained if the dummy variable were omitted from the model, and the observation in question was deleted from the sample for all of the model’s variables. See Salkever (1976) for details. Also, the residual for that one special observation will be exactly zero.

Under standard assumptions, the OLS estimator of the coefficient of such a dummy variable is inconsistent, even though OLS is still best linear unbiased. The OLS estimator for the coefficient vector associated with the remaining regressors retains its usual weak consistency property. The variance of the singleton dummy is still consistent. You can use this to test if that singleton is having a statistically significant impact on your estimated model. All this is covered in Hendry and Santos (2005), who also discuss what happens when a dummy variable is one for a finite and fixed number of observations, rather than just a single observation. An example is a monthly time series analysis, where you put in dummies for each of the COVID-19 months. Essentially, the same problem arises.

This result also holds for GMM, any generalized IV estimator, the MLE for any of the standard count-data models (Poisson, Negative Binomial), and also for quantile regression. See Giles (2011) for this.

All this is to say that you should definitely not include the singleton dummy in your model if you are interested in doing inference on its coefficient or interpreting it. Your other coefficients should still be fine.

Personally, I would exclude that observation entirely, or maybe do the Hendry and Santos test above if you do leave it in, or at least some kind robustness check that ensure that your results don't hinge on it.

As far as what you can include in the model, you always need to drop one dummy variable to avoid the dummy variable trap. So with 4 regions, you will have at most 3 dummies. Excluding the singleton dummy variable in addition to the baseline effectively includes it with the omitted category. I would only do this if it makes sense given some domain knowledge.

For example, take your 3 region dummies. If the baseline region and the singleton dummy are near each other (in space or culture or language), bundling them together might be acceptable. You can also bundle it with one of the included regions by recoding the singleton observation.

References:

Salkever, D. S. (1976). "The use of dummy variables to compute predictions, prediction errors, and confidence intervals." Journal of Econometrics, 4, 393-397.

Hendry, D. F. and C. Santos (2005), "Regression models with data-based indicator variables." Oxford Bulletin of Economics and Statistics, 67, 571-595.

Giles, D. E. (2011). "Econometric models with single-valued dummy variables" Mimeo., Department of Economics, University of Victoria

• Thank you very much for this informative and thorough answer. I understand this now better. Dec 17, 2020 at 15:14