Dear R-users, I was wondering if someone could give me some advices on the following problem. I tried to apply moran’s test to a small dataset and couldn’t succeed, here is the error message: mor <- moran.test(x, res2) Avis dans moran.test(x, res2) : Out-of-range p-value: reconsider test arguments mor Moran's I test under randomization data: x weights: res2 Moran I statistic standard deviate = NaN, p-value = NA alternative hypothesis: greater sample estimates: Moran I statistic Expectation Variance -0.04166667 -0.04166667 0.00000000 It seems that I have a problem computing the standard deviation, variance and/or p-value. As a brief overview of what are x and res2: I have a square sample plot on the field divided into 5 lines / 5 columns and one value per “sub-plot”, so a dataframe of 25 values (25 cells and 1 value per cell…). The parameter x is a numeric vector containing those 25 values: str(x) num [1:25] 22920 19546 16170 21387 9499 ... To obtain my spatial weight matrix, I used 2 columns (X & Y) representing the coordinates of the center of each sub-plot (20x20m, so 10:10, 10:30, 10:50, etc.), transformed it into a neighborhood matrix of class “nb” with dnearneigh() function, then into a object of class “listw” with nb2listw() function (with style=”B”). I end up with “res2” : res2 Characteristics of weights list object: Neighbour list object: Number of regions: 25 Number of nonzero links: 600 Percentage nonzero weights: 96 Average number of links: 24 Weights style: B Weights constants summary: n nn S0 S1 S2 B 25 625 600 1200 57600 Ok so it seems quiet straightforward to me and I cannot figure out from where my problem is coming !!! any idea ? with regards [[alternative HTML version deleted]]