I would like to use a weighted least squares (WLS) regression to perform tests on heteroscedastic spatial data.
Each data point represents the mean of some variable over an area, and the sample sizes between the areas vary, so intuitively the things I'm measuring are more error prone in areas with a small sample size.
The variance of a mean is inversely proportional to the sample size, so presumably I should weight the regression by the inverse of this i.e. weight each point by the sample size that point was derived from.
But do I use, in this, the sample size from the dependent variable, the sample size from the independent variable - or both?