I'm working with spatial data (two rasters or matrix in the attached Figure), that is distributed in a 2D-space and each grid has a value. The two grids have the same number of cells.
Variable "Y" is a summary statistic defining "diversity". Such value is estimated from "yi"...."yn", where "n" is 12 for each square. Therefore I will have "Y" from "j" to "N", where "N" is the number of grids.
I would conclude that variable Y is subjected to a fixed effect (related to Variable X) and a random effect (related to spatial autocorrelation and "n").
My objective is to assess whether exist a correlation between the two variables and model it throughout spatial regression.
As you can see in the raster for variable Y, the blue points are much less than the red or orange points. My concern is that these differences in sample sizes (if this is the correct statistical term) between blu, orange and red cells, can affect the reliability of the correlation and spatial regression analysis. Is this correct?
My questions are:
1) If differences in sample size across data points with a certain Y values can affect the spatial regression.
2) How can I reduce the random effect when I plot the data? Would be correct to use the mean values for observations that have the same or similar X value? And then make the spatial regression on these averages?