What happens when I leave out empty cells in regression? I'm using Stata 14.1 to do a regression, and I got a matsize too small error. It gave some more output to tell me possible reasons for this problem, and I think this was the reason that applied to me

If you are using factor variables and included an interaction that has
lots of missing cells, either increase matsize or set emptycells drop to
reduce the required matrix size; see help set emptycells.


Yes, I am using factor variables (one for each state in the US and Washington DC), and yes there are a lot of empty cells.

I'm trying to figure out which option is better, drop empty cells or increase the matrix size so it can include all the factor variables.

It has help articles on how to do both of those things: drop empty cells or increase matsize. It's not the "how" but the "why" that I'm trying to figure out. What happens mathematically when I drop empty cells? (I probably won't understand the math, so if there's a dumbed down answer just about whether it's good or bad to leave off empty cells, that would probably be better.)
When you have empty cells (and by empty cells, I assume that you are referring to a missing value of an observation specific variable), then STATA by default drops the entire row. So in a sense, even when you have a single missing value on a variable and you have say 100 variables, you lose the whole row (the entire observation). This is by default. If you want to avoid this, perhaps think about imputing the missing data points.