I have 3 raster datasets. All 3 are values of continuous indices varying between 1 and -1. These are satellite measurements of the same area, divided in a raster. Each cell has a value for every index. The indices representing measures in a pixel are:

  • The NDVI, representing vegetation.
  • The NDWI, representing water.
  • The SWI, representing temperature.

Now I would like to know the influence of NDWI (water) on the correlation between SWI (temperature) and NDVI (vegetation). Temperature has a positive relation with vegetation, water a negative relation with temperature. Water has a positive relation with vegetation.

Now I would like to show that water has a negative effect on the correlation between vegetation and temperature. So the temperature will go down and vegetation will go up when introducing a higher water value. So more water will show a lower value of vegetation/temperature correlation.

Could I just correlate NDWI (water) with the correlation results of SWI (temperature) and NDVI (vegetation)? I have looked at the Fisher z test, but this is just about comparing two correlations, and so I think this does not cover my question. I hope you could give me some advice.


1 Answer 1


Essentially, you're interested in moderation, which relates closely to (I've added this tag to the OP). I found myself a little puzzled by the problem of applying it to a correlation rather than to a regression, but I've got an idea, and would welcome feedback or better alternative methods, if any.

Moderation analysis in multiple regression is straightforward, but requires choosing a dependent variable to predict (outcome), and produces slightly different results when you change your choices of outcome and predictors. Only produces the same estimate as a bivariate correlation regardless of which variable predicts which. If you add to these two, opposite-but- equal models only the product of your predictor variable and third variable, it seems you'll get slightly different effect size estimates, but identical ratios of these estimates to their s $(SE)$.

Hence if you want a simple, test of the of the that water does not moderate the relationship between vegetation and temperature, you can test either model: $$\text{vegetation}=a_1+\text{temperature}\times b_1+\text{temperature}\times\text{water}\times c_1$$ $$\text{temperature}=a_2+\text{vegetation}\times b_2+\text{vegetation}\times\text{water}\times c_2$$ where both $a=$ intercept coefficients, $b\approx$ bivariate correlation coefficients, and $c=$ the regression coefficient for water's moderating effect on $b$.

For a of your evidence against $c=0$ (the null hypothesis I described above), $\frac{c}{SE_c}=t_{(df)}$ (two-tailed) with $df=N-3$ where $N=$ your number of observations and $3=$ the number of coefficients in the . The $p$ for that $t$ represents the probability that you would find a moderating effect of water at least as strong as in your data if you were to sample again randomly from the same population, and if there really is no moderating effect overall.

If the moderating effect in your data is strong, that probability should be quite small, which would support your alternative hypothesis. In this case, I'd also recommend calculating a (CI) around $c$ to give you a better sense of how reliable your estimate of that effect is. You can even skip the $t$-test entirely if you don't care so much about the precise probability of your sample given the null. The closest-to-zero boundary of a CI that excludes zero represents the value furthest from zero that you could have rejected as a null hypothesis at the level of $\alpha$ used in constructing the CI.

One bit that's still a little confusing to me about this is that $\frac{c_1}{SE_{c_1}}\ne\frac{c_2}{SE_{c_2}}$ if I center (cf. ) the predictor variable before multiplying it by the moderator. Whether you center and which variable to choose as your predictor shouldn't make a tremendous difference (e.g., either way, you'll probably reach the same conclusion about the null hypothesis mentioned above), I think...but I'm not sure what to recommend in your case, because the issue strikes me as somewhat unresolved in general. For further reading on whether to center interacting predictors, see the following:

Also, if you're going to use this interaction term, it's important to include water as a predictor as well. Doing so may make your choice of predictor and outcome more important, and will effectively alter the question you're analyzing, but hopefully the change will be informative.

  • $\begingroup$ wow, precisely what I needed. Also you're right about applying a regression instead of a correlation. Thanks a lot! $\endgroup$
    – MGIGijs
    Commented Feb 27, 2014 at 10:05
  • $\begingroup$ What if my data isn't all normally distributed? The NDVI is negatively skewed, and my NDWI is positively skewed. The SWI is normally distributed. Would I still be able to create a linear model? $\endgroup$
    – MGIGijs
    Commented Mar 6, 2014 at 11:43
  • $\begingroup$ Yes, but nonnormal data affects the meaning of the regression slopes. It even changes the meaning of your bivariate correlation between NDVI and SWI. See Pearson's or Spearman's correlation with non-normal data and Measuring linear correlation of non-normally distributed variables. $\endgroup$ Commented Mar 6, 2014 at 12:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.