I have a set of environmental variables (slope, aspect, vegetation, landforms, etc.) in raster format. I would like to evaluate if the distribution of each variable is comparable across rasters created by two different polygons. Basically, I am doing some analyses on a sample of a larger area/raster, and want to make sure that the environmental variables are representative of the larger area.
It's been suggested that I try to export the attribute tables for each raster clipped to each polygon and look at the data in excel, which means a lot of work. Is there a way to do this in ArcGIS - something like a difference of means t-test that compares the distribution of a single variable across two rasters?
extract your areas using your polygons, then perhaps
Raster to Point—Conversion toolbox | ArcGIS Desktop
from there it depends on what you want to do.
Of course, exporting your samples to numpy arrays
(see RasterToNumPyArray RasterToNumPyArray—ArcPy Functions | ArcGIS Desktop )
would enable you to use scipy stack tools like
scipy.stats.ttest_ind — SciPy v1.1.0 Reference Guide
scipy.stats.ttest_rel — SciPy v1.1.0 Reference Guide
and I am sure R has stuff, but it requires extra hurdl e
If you define your polygon and then Run the “clip” tool, be sure to turn on checkbox to clip to geometry, and define a NoData value for pixels outside the polygon, you'll clip out a new image containing pixels only within the polygon:
If you do not wish to save your clipped file to disk, you can also use the CLIP raster function to create a temporary layer.
Then run "Band Collection Statistics" to calculate mean, standard deviation, more:
(note this requires the Spatial Analyst extension)
Your statistics should not be counting the NoData pixels - verify that in your statistics table. If you have a multiband file, you'll get statistics for each band
Cody B.
and from that you should be able to construct your desired t-test manually