Number of observations for multiple linear regression I've read multiple responses here that the recommended range of observations per each IV is 20. However, I'd like to ask for clarification on whether this number (20) includes dummy variables.
Let's say I have a dataset that includes a categorical feature Pet Type with 3 options Dog, Cat, and Parrot.




Pet Type




Dog


Cat


Parrot




If I were to create dummy variables to convert Pet Type into Dog, Cat, Parrot:




Dog
Cat
Parrot




1
0
0


0
1
0


0
0
1




Does it mean that I have 3 independent variables now and I need at least 3 * 20 = 60 observations? Or is it still considered a single variable and I need at least 20 observations?
 A: For this type of 3-level predictor you only would specify 2 dummy variables and have the 3rd (reference) level represented by having 0s for all the other levels. The reference level is thus incorporated into the intercept of your model. In your case, you could for example omit the dummy for Dog to have that be the reference level of the PetType variable.
Each of those remaining dummies, however, needs to be considered as a separate independent variable (IV) in terms of having a high enough observation/IV ratio. So if your rule of thumb is 20 observations per IV, you would need 40. Also, if these dummies are involved in interactions, you need to include each of its interactions as an IV, too. The idea is that you need to have enough observations per regression coefficient that you estimate.
Remember that the value of 20 is a rule of thumb. Depending on the nature of your data, that might be more or less than you actually need to avoid overfitting. It can be wise to evaluate overfitting directly, for example via modeling on repeated bootstrapped samples from your data.
