# Interpreting linear regression with NA for estimates

I have 3 variables. Income is the dependent variable(continuous), sex(binomial), workhrs(categorical) i fitted a linear model and obtained the result:

My question is: Is this model usable? The NA values come from the fact that workhrs is missing 4 categories. The fifth one is i think due to coliniarity. The adjusted R squared is pretty high, but is the model Usefull to predict? or the interaction is not useful and should be dropped?

Call:
lm(formula = income ~ factor(sex) + factor(workhrs) + factor(sex):factor(workhrs))

Residuals:
Min     1Q Median     3Q    Max
-6.757 -1.261  0.000  1.531  5.690

Coefficients: (5 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept)                      31.330      4.645   6.744 8.42e-05 ***
factor(sex)1                      0.160      6.569   0.024 0.981101
factor(workhrs)1                  2.930      5.689   0.515 0.618960
factor(workhrs)2                 13.240      8.691   1.523 0.161968
factor(workhrs)4                 10.935      5.689   1.922 0.086773 .
factor(workhrs)5                  6.960      6.569   1.059 0.316997
factor(workhrs)6                 30.045      8.691   3.457 0.007192 **
factor(workhrs)7                 18.315      5.689   3.219 0.010503 *
factor(workhrs)8                 26.947      5.364   5.024 0.000715 ***
factor(workhrs)9                 25.340      6.569   3.857 0.003863 **
factor(workhrs)10                38.850      9.291   4.182 0.002370 **
factor(sex)1:factor(workhrs)1     9.160      8.691   1.054 0.319347
factor(sex)1:factor(workhrs)2        NA         NA      NA       NA
factor(sex)1:factor(workhrs)4     9.060      8.046   1.126 0.289276
factor(sex)1:factor(workhrs)5    23.035      8.691   2.651 0.026451 *
factor(sex)1:factor(workhrs)6        NA         NA      NA       NA
factor(sex)1:factor(workhrs)7     3.325      8.691   0.383 0.710895
factor(sex)1:factor(workhrs)8        NA         NA      NA       NA
factor(sex)1:factor(workhrs)9        NA         NA      NA       NA
factor(sex)1:factor(workhrs)10       NA         NA      NA       NA
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 4.645 on 9 degrees of freedom
Multiple R-squared:  0.9263,    Adjusted R-squared:  0.8117
F-statistic: 8.083 on 14 and 9 DF,  p-value: 0.001742


## 1 Answer

Residual standard error: 4.645 on 9 degrees of freedom

This means that you have only 9 more observations than number of parameters in the model. You would like to have a little more than that to have any hope for a sensible result. My rule of thumb is to have at least 20 observations per parameter to estimate when dealing with financial or economic data.

UPDATE: the NAs are a different but related issue. Most likely you did not have different sexes working 6 hours, so it can't estimate this interaction, and reports NA. If you had more observations, you would likely address issue too.

As a workaround, I'd suggest you introduce workhours as a continuous variable. This way the number of parameters would shrink very considerably. It may not be ideal situation, but you simply have not enough observations to estimate this model specification.

• So this means that the model is not useful or not usable ? – user3612505 May 8 '14 at 17:22
• Estimates are not usable. You need more observations to estimate your model specification. – Aksakal May 8 '14 at 17:39
• If i would not take workhrs as categorical, wouldnt that change the model works? can you explain how the model changes in this case? – user3612505 May 8 '14 at 18:26
• @Bob, of course it's a different model. A continuous work hours variable states that the relationship is linear, while categorical is free of such constraint, that's why it needs more data to estimate. You could play with a linear spline, e.g. introduce two variables MAX(wh,4) and MIN(wh,4), then you'll have two slopes for high and low work hours. It's like in between the linear model and your categorical. – Aksakal May 8 '14 at 18:30