1

When I fit the following model

fullmod <-lme(rrF~Old_N_dep+Overstory_old+Altitude+MAT+MAP+EIV_R+EIV_F+Overstory_diff+SCA_old+SCA_diff,data = regdataOver,random = ~ 1|PlotNR, method = "REML")

I get this error:

Error in na.fail.default(list(rrF = c(-0.0380393284017694, -0.0110047996186618,  : 
  missing values in object

It should be something similar to what I see here, since I also don't have real missing values in 'rrF'. I tried to solve it by adding na.action=na.exclude in the model function as it is suggested, but I get another error:

> fullmod <-  lme(rrF ~ Old_N_dep+Overstory_old+Altitude+MAT+MAP+EIV_R+EIV_F+Overstory_diff+SCA_old+SCA_diff, data = regdataOver,random = ~ 1|PlotNR, method = "REML", na.action=na.exclude)
Error in solve.default(estimates[dimE[1] - (p:1), dimE[2] - (p:1), drop = FALSE]) : 
  system is computationally singular: reciprocal condition number = 8.17376e-17

I really don't know what's the problem with my data.

Correlation matrix (Spearman) (UPDATE):

               Altitude Initial_survey   MAT   MAP Old_N_dep EIV_R EIV_N EIV_F Overstory_old Overstory_diff SCA_old SCA_diff
Altitude              1                                                                                                     
Initial_survey     0.35              1                                                                                      
MAT               -0.42          -0.13     1                                                                                
MAP                0.55           0.27 -0.23     1                                                                          
Old_N_dep          0.35           0.97 -0.04  0.36         1                                                                
EIV_R              0.21           0.13  -0.4   0.2      0.13     1                                                          
EIV_N              0.07           0.09 -0.34  0.24      0.09   0.7     1                                                    
EIV_F             -0.12          -0.01 -0.06 -0.03     -0.01  0.19  0.49     1                                              
Overstory_old     -0.08          -0.07 -0.08  0.19     -0.02  0.31  0.37  0.12             1                                
Overstory_diff     0.19           0.06 -0.02  0.17      0.06  0.01  0.05  0.03         -0.54              1                 
SCA_old            0.39           0.12  -0.5  0.23      0.09  0.36  0.24 -0.01          0.08           0.14       1         
SCA_diff          -0.13          -0.07  0.09 -0.01     -0.07 -0.12  0.01  0.02             0           0.07   -0.43        1
Community
  • 1
  • 1
Gabriele Midolo
  • 231
  • 1
  • 9

1 Answers1

0

First check if one of your variables is strongly correlated to another. To do this type

cor(regdataOver)

If there are 2 variables whom correlation coefficient is near 1 or -1 then you have a situation where one variable can be linearly expressed through another ant you can not invert your matrix (regressor matrix).