[R] NA in lm model summary, no NA in data table!
stefy
s.kadochova at seznam.cz
Sat Aug 13 20:41:50 CEST 2011
Dear users of R!
I have problems with linear model summary. I do not have any NA values in my
data table, but in summary of linear model there are some NA instead of
resulst. I don´t know why :(
I am interested in ecological factors influencing temperature in ant nest, I
have data concerning ant nest temperature and air temperature and some nest
parameters as explanatory variable. Nest and air temperatues are different
every day, nest parameters as size, moisture, shading do not change with the
date.
It looks like this:
date nest nest.temp nest.t.fluctuation air.temperature nest.size
nest.GPS rain sun
1.3. A1 25.3 5.02 12.3
1.06 856 225 1247
2.3. A1 23.1 4.5 11.9
1.06 856 225 1247
...
In results I can see:
> summary(model3)
Call:
lm(formula = t.change ~ nest + dat.1 + GPS + moist + volume +
T.prum + a.flukt + sun.year)
Residuals:
Min 1Q Median 3Q Max
-5.0853 -0.1879 0.0104 0.1874 4.0023
Coefficients: (3 not defined because of singularities)
Estimate Std. Error t value Pr(>|t|)
(Intercept) -5.035e+00 3.805e+00 -1.323 0.186
nestA2 -1.742e+01 2.672e+00 -6.522 1.02e-10 ***
nestA3 -2.371e+00 2.880e-01 -8.232 4.75e-16 ***
nestA4 -7.886e+00 1.140e+00 -6.920 7.35e-12 ***
nestB1 -5.000e+00 7.298e-01 -6.852 1.16e-11 ***
nestB2 7.874e-01 1.897e-01 4.151 3.54e-05 ***
nestB3 2.435e+00 3.852e-01 6.321 3.66e-10 ***
nestB4 -4.804e+00 7.522e-01 -6.387 2.41e-10 ***
nestC1 -1.985e+01 3.002e+00 -6.613 5.67e-11 ***
nestC2 -8.721e+00 1.291e+00 -6.753 2.25e-11 ***
nestC3 -2.143e+01 3.254e+00 -6.585 6.80e-11 ***
nestC4 -6.586e+00 9.884e-01 -6.663 4.08e-11 ***
dat.1 -1.610e-04 1.026e-04 -1.568 0.117
GPS NA NA NA NA
moist 5.675e-01 8.669e-02 6.546 8.75e-11 ***
volume NA NA NA NA
T.prum -1.138e-02 1.608e-03 -7.078 2.48e-12 ***
a.flukt -1.584e-02 2.415e-03 -6.558 8.10e-11 ***
sun.year NA NA NA NA
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.4568 on 1199 degrees of freedom
(92 observations deleted due to missingness)
Multiple R-squared: 0.2305, Adjusted R-squared: 0.2209
F-statistic: 23.95 on 15 and 1199 DF, p-value: < 2.2e-16
> help.search("singularities")
No help files found with alias or concept or title matching ‘singularities’
using fuzzy
matching.
>
I count data separately for each season of year (spring, summer...),
togehter I have more than 1000 rows in table (91 days for each of 12 nests).
There are no NA values in my data, most of factors are numeric vectors,
there are only 2 factors. I have chcecked whether the factors are saved as
factors, I have searched for NA values... Ihave tried to load the date many
times... but nothing.
When I do the model forward, when I start with GPS it is ok, the summary
shows DF, sum of squares, p, but when I fitt whole model and update it by
taking away unsignificant variables the model shows NA in summary. It writes
something about "singularities" but I can´t found it i help.
The most strange is, that this problem occures only in some data sheeds, for
example it occurs in "spring" but not in "summer". But the data arangement
and process of counting in R I have used are identical.
Please, could you help me?
Thank you very much
Stefy
--
View this message in context: http://r.789695.n4.nabble.com/NA-in-lm-model-summary-no-NA-in-data-table-tp3741822p3741822.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list