I’d like to learn a bit more about the model you’re working on. It looks like you’re making the following assumptions:
- You have binary-valued data on a 2D grid which is modeled using a combination of logistic regression and cross-neighbor correlation
- You want each grid cell’s observation to be correlated with the immediate neighbors.
This sounds quite a bit like the autologistic model which (I think) is synonymous with binary conditional autoregression. Are these terms relevant to your problem?