Implement a function to produce a scatter plot of residuals vs neighbouring (weighted) mean of residuals from a fitted model, as a diagnosis for competition.
This scatter plot should ideally come from a bivariate Normal distribution.
Report the observed correlation, and a corresponding p-value.
This function would also useful for diagnosing spatial autocorrelation at short range.
Implement a function to produce a scatter plot of residuals vs neighbouring (weighted) mean of residuals from a fitted model, as a diagnosis for competition.
This scatter plot should ideally come from a bivariate Normal distribution. Report the observed correlation, and a corresponding p-value.
This function would also useful for diagnosing spatial autocorrelation at short range.