You may run an ANOVA, or Regression, or some other estimation procedure in Stata and get the error…
too many variables or values (matsize too small) r(146);
By default, Stata only allocates enough memory for up to 40 predictors. Even small ANOVA or regression models can exceed this limit when you include interaction terms or dummy variables. You can increase the matsize to permit up to 200 variables as shown below.
set matsize 200
Keep increasing the value of matsize until you no longer get the error above. The value of matsize you choose lasts as long as your Stata session, and would need to be set again if you quit Stata. Or, you can use the permanently option and the value will be remembered even after you close and restart Stata, for example
set matsize 200, permanently