[R] Singularity in a regression?

Bob Gotwals gotwals at ncssm.edu
Thu Feb 26 13:58:49 CET 2009


R friends,

In a matrix of 1s and 0s, I'm getting a singularity error.  Any helpful ideas?

lm(formula = activity ~ metaF + metaCl + metaBr + metaI + metaMe +
     paraF + paraCl + paraBr + paraI + paraMe)

Residuals:
        Min         1Q     Median         3Q        Max
-4.573e-01 -7.884e-02  3.469e-17  6.616e-02  2.427e-01

Coefficients: (1 not defined because of singularities)
             Estimate Std. Error t value Pr(>|t|)
(Intercept)   7.9173     0.1129  70.135  < 2e-16 ***
metaF        -0.3973     0.2339  -1.698 0.115172
metaCl            NA         NA      NA       NA
metaBr        0.3454     0.1149   3.007 0.010929 *
metaI         0.4827     0.2339   2.063 0.061404 .
metaMe        0.3654     0.1149   3.181 0.007909 **
paraF         0.7675     0.1449   5.298 0.000189 ***
paraCl        0.3400     0.1449   2.347 0.036925 *
paraBr        1.0200     0.1449   7.040 1.36e-05 ***
paraI         1.3327     0.2339   5.697 9.96e-05 ***
paraMe        1.2191     0.1573   7.751 5.19e-06 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.2049 on 12 degrees of freedom
Multiple R-squared: 0.9257,	Adjusted R-squared: 0.8699
F-statistic: 16.61 on 9 and 12 DF,  p-value: 1.811e-05




More information about the R-help mailing list