This tool performs a bivariate linear regression analysis on two input raster images. The first image is considered to be the independent variable while the second image is considered to be the dependent variable in the analysis. The tool will output a text report summarizing the regression model, an Analysis of Variance (ANOVA), and the significance of the regression coefficients. The regression residuals can optionally be output as a new raster image and the user can also optionally specify to standardize the residuals.
Note that the analysis performs a linear regression; two variables may be strongly related by a non-linear association (e.g. a power function curve) which will lead to an apparently weak fitting regression model. In fact, non-linear relations are very common among spatial variables, e.g. terrain indices such as slope and contributing area. In such cases, it is advisable that the input images are transformed prior to the analysis.
The following is an example of a Python script that uses this tool:
wd = pluginHost.getWorkingDirectory()
inputFile1 = wd + "input1.dep"
inputFile2 = wd + "input2.dep"
outputResiduals = "not specified"
standardizeResiduals = "true"
args = [inputFile1, inputFile2, outputResiduals, standardizeResiduals]
pluginHost.runPlugin("ImageRegression", args, False)
This is a Groovy script also using this tool:
def wd = pluginHost.getWorkingDirectory()
def inputFile1 = wd + "input1.dep"
def inputFile2 = wd + "input2.dep"
def outputResiduals = wd + "residuals.dep"
def standardizeResiduals = "true"
String[] args = [inputFile1, inputFile2, outputResiduals, standardizeResiduals]
pluginHost.runPlugin("ImageRegression", args, false)