# [R] Summary coefficients give NA values because of singularities

Gathurst ajdowd at hotmail.co.uk
Mon Dec 5 21:57:34 CET 2011

```Hello,

I have a data set which I am using to find a model with the most significant
parameters included and most importantly, the p-values.  The full model is
of the form:
where the 9 variables on the right hand side are all indicator variables.
The thing I don't understand is the line ' sad[, 10]         NA         NA
NA       NA ' as a result of 'Coefficients: (1 not defined because of
singularities)'.

I think the output is taking sad[,10] as the intercept, based on previous
attempts at figuring my issue out, which I find a bit wierd considering
sad[,10] is either 0 or 1.  How do I produce the correct output showing all
p-values?

My code and output is as follows:

Call:

Residuals:
Min      1Q  Median      3Q     Max
-3.3191 -0.3893  0.0519  0.7436  1.0519

Coefficients: (1 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept)  4.34091    0.14495  29.947   <2e-16 ***
sad[, 2]    -0.16142    0.18128  -0.890   0.3737
sad[, 3]    -0.23221    0.20275  -1.145   0.2527
sad[, 4]     0.17832    0.19695   0.905   0.3657
sad[, 5]     0.06450    0.21447   0.301   0.7638
sad[, 6]    -0.15909    0.18713  -0.850   0.3957
sad[, 7]    -0.39286    0.18171  -2.162   0.0311 *
sad[, 8]    -0.08450    0.21146  -0.400   0.6896
sad[, 9]    -0.02176    0.20170  -0.108   0.9141
sad[, 10]         NA         NA      NA       NA
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.9615 on 477 degrees of freedom
Multiple R-squared: 0.02984,    Adjusted R-squared: 0.01357
F-statistic: 1.834 on 8 and 477 DF,  p-value: 0.06869