Hello I am trying to computes Moran's I autocorrelation coefficient of x giving a matrix of weights using the ape package. The null hypothesis of no correlation is tested assuming normality of the Moran's coefficient under this null hypothesis. I got a p-value=0
Does it mean that the p value is incredibly small that R cannot approximate it?
What is the lowest number that R displays before rounding it to 0? Can I change any options to get a number different than zero?
Base R's double data type can represent numbers down to 2e-308. You can see this in the help text of the double() function. My experience is that functions that return a p value have their own cutoff. The lm() function, for example, will list <2.2e-16 for very small values. I did not see a limit mentioned in the documentation of the ape package or the Moran.I() function.
The first thing I would do after getting such a low p value is check the values in residuals(mod_glm). Are they all zero?
My own experience is that when I get such a good result I have not run the fit I intended.
I am not too familiar with the {ape} package (I am more of a social sciences person). But having said that my first impulse should Moran's I start to behave funny on me would be to double check using other implementations; spdep::moran.test() and sfdep::global_moran_test() come to my mind.