# mantel correlogram

9 messages
Open this post in threaded view
|

## mantel correlogram

 Hello, We're preparing a field sampling program, and would like to determine a minimum distance between samples to reduce/eliminate spatial autocorrelation. I think a good approach would be to calculate a mantel correlogram, and use the range of the correlogram as our minimum sampling distance. * Questions 1) is this a reasonable approach 2) if so, how best to do this? * Details We have a vector map with the point coordinates of several hundred potential sampling sites, and ~ 10 raster layers with appropriate data to test for spatial autocorrelation (WORLDCLIM, soils). I could do something like the following, but I'm not sure if there's a simpler or more appropriate approach: 1) extract the raster data for each point 2) save the data to csv; import into R 3) calculate the spatial distances between points, after projecting the lat-long data into an appropriate scale (?) 4) calculate the climate distance using the WORLDCLIM data 5) use the 'mgram' function in the 'ecodist' package to calculate the actual correlogram between the spatial distance and climate distance Any suggestions on the approach or the methods would be welcome! Thanks, Tyler _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 Use R. It includes Moran's I and Geary's C tests for spatial-autocorrelation. Look like it has  mantel too. You'll probably need the sp, spdep and rgdal packages. You might also want to use the Raster package to extract the sampling data, or you can use spGRASS to tie the R and Grass together. See chapter 9 (1st ed) of Applied Spatial Data Analysis with R. http://www.asdar-book.org/Enjoy, Alex On 03/11/2014 09:18 AM, Tyler Smith wrote: > Hello, > > We're preparing a field sampling program, and would like to determine > a minimum distance between samples to reduce/eliminate spatial > autocorrelation. I think a good approach would be to calculate a > mantel correlogram, and use the range of the correlogram as our > minimum sampling distance. > > * Questions > > 1) is this a reasonable approach > 2) if so, how best to do this? > > * Details > We have a vector map with the point coordinates of several hundred > potential sampling sites, and ~ 10 raster layers with appropriate data > to test for spatial autocorrelation (WORLDCLIM, soils). I could do > something like the following, but I'm not sure if there's a simpler or > more appropriate approach: > > 1) extract the raster data for each point > 2) save the data to csv; import into R > 3) calculate the spatial distances between points, after projecting > the lat-long data into an appropriate scale (?) > 4) calculate the climate distance using the WORLDCLIM data > 5) use the 'mgram' function in the 'ecodist' package to calculate the > actual correlogram between the spatial distance and climate distance > > Any suggestions on the approach or the methods would be welcome! > > Thanks, > > Tyler > _______________________________________________ > grass-user mailing list > [hidden email] > http://lists.osgeo.org/mailman/listinfo/grass-user> _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 Alex,I believe Tyler does plan on using R for the statistical analyses, but using GRASS GIS in combination with R is the easiest path, I think.TomOn Tuesday, March 11, 2014, Alex Mandel <[hidden email]> wrote: Use R. It includes Moran's I and Geary's C tests for spatial-autocorrelation. Look like it has  mantel too. You'll probably need the sp, spdep and rgdal packages. You might also want to use the Raster package to extract the sampling data, or you can use spGRASS to tie the R and Grass together. See chapter 9 (1st ed) of Applied Spatial Data Analysis with R. http://www.asdar-book.org/ Enjoy, Alex On 03/11/2014 09:18 AM, Tyler Smith wrote: > Hello, > > We're preparing a field sampling program, and would like to determine > a minimum distance between samples to reduce/eliminate spatial > autocorrelation. I think a good approach would be to calculate a > mantel correlogram, and use the range of the correlogram as our > minimum sampling distance. > > * Questions > > 1) is this a reasonable approach > 2) if so, how best to do this? > > * Details > We have a vector map with the point coordinates of several hundred > potential sampling sites, and ~ 10 raster layers with appropriate data > to test for spatial autocorrelation (WORLDCLIM, soils). I could do > something like the following, but I'm not sure if there's a simpler or > more appropriate approach: > > 1) extract the raster data for each point > 2) save the data to csv; import into R > 3) calculate the spatial distances between points, after projecting > the lat-long data into an appropriate scale (?) > 4) calculate the climate distance using the WORLDCLIM data > 5) use the 'mgram' function in the 'ecodist' package to calculate the > actual correlogram between the spatial distance and climate distance > > Any suggestions on the approach or the methods would be welcome! > > Thanks, > > Tyler > _______________________________________________ > grass-user mailing list > grass-user@... > http://lists.osgeo.org/mailman/listinfo/grass-user > _______________________________________________ grass-user mailing list grass-user@... http://lists.osgeo.org/mailman/listinfo/grass-user -- Thomas E Adams, III718 McBurney DriveLebanon, OH 450361 (513) 739-9512 (cell) _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 You are right, I didn't read it that closely 1st time around. My point was that all of it can be done in R, and there are geospatial specific packages that have all the tests one might want. The bare minimum interaction is via rgdal or spgrass to pull data over from existing GRASS data sets. If the data isn't already in GRASS then rgdal one can read the original files directly. No need to pass csv around. Of course if it is in GRASS then you should have it all in the same projection already anyways if you put it all into the same mapset/location. The other book likely to have exactly what you want (field sampling design) is Ch 5. http://www.amazon.com/Spatial-Analysis-Ecology-Agriculture-Using/dp/1439819130/ref=la_B001K6MGR8_1_1?s=books&ie=UTF8&qid=1394557436&sr=1-1Enjoy, Alex On 03/11/2014 09:58 AM, Thomas Adams wrote: > Alex, > > I believe Tyler does plan on using R for the statistical analyses, but > using GRASS GIS in combination with R is the easiest path, I think. > > Tom > > On Tuesday, March 11, 2014, Alex Mandel <[hidden email]> wrote: > >> Use R. It includes Moran's I and Geary's C tests for >> spatial-autocorrelation. Look like it has  mantel too. >> >> You'll probably need the sp, spdep and rgdal packages. You might also >> want to use the Raster package to extract the sampling data, or you can >> use spGRASS to tie the R and Grass together. >> >> See chapter 9 (1st ed) of Applied Spatial Data Analysis with R. >> http://www.asdar-book.org/>> >> Enjoy, >> Alex >> >> On 03/11/2014 09:18 AM, Tyler Smith wrote: >>> Hello, >>> >>> We're preparing a field sampling program, and would like to determine >>> a minimum distance between samples to reduce/eliminate spatial >>> autocorrelation. I think a good approach would be to calculate a >>> mantel correlogram, and use the range of the correlogram as our >>> minimum sampling distance. >>> >>> * Questions >>> >>> 1) is this a reasonable approach >>> 2) if so, how best to do this? >>> >>> * Details >>> We have a vector map with the point coordinates of several hundred >>> potential sampling sites, and ~ 10 raster layers with appropriate data >>> to test for spatial autocorrelation (WORLDCLIM, soils). I could do >>> something like the following, but I'm not sure if there's a simpler or >>> more appropriate approach: >>> >>> 1) extract the raster data for each point >>> 2) save the data to csv; import into R >>> 3) calculate the spatial distances between points, after projecting >>> the lat-long data into an appropriate scale (?) >>> 4) calculate the climate distance using the WORLDCLIM data >>> 5) use the 'mgram' function in the 'ecodist' package to calculate the >>> actual correlogram between the spatial distance and climate distance >>> >>> Any suggestions on the approach or the methods would be welcome! >>> >>> Thanks, >>> >>> Tyler > _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 Thanks for your suggestions. It looks like the R Borg is continuing to assimilate procedures that once required specialty software. Time to learn some new packages! Tyler On March 11, 2014 1:08:10 PM EDT, Alex Mandel <[hidden email]> wrote: >You are right, I didn't read it that closely 1st time around. My point >was that all of it can be done in R, and there are geospatial specific >packages that have all the tests one might want. The bare minimum >interaction is via rgdal or spgrass to pull data over from existing >GRASS data sets. If the data isn't already in GRASS then rgdal one can >read the original files directly. No need to pass csv around. Of course >if it is in GRASS then you should have it all in the same projection >already anyways if you put it all into the same mapset/location. > >The other book likely to have exactly what you want (field sampling >design) is Ch 5. >http://www.amazon.com/Spatial-Analysis-Ecology-Agriculture-Using/dp/1439819130/ref=la_B001K6MGR8_1_1?s=books&ie=UTF8&qid=1394557436&sr=1-1> >Enjoy, >Alex > >On 03/11/2014 09:58 AM, Thomas Adams wrote: >> Alex, >> >> I believe Tyler does plan on using R for the statistical analyses, >but >> using GRASS GIS in combination with R is the easiest path, I think. >> >> Tom >> >> On Tuesday, March 11, 2014, Alex Mandel <[hidden email]> >wrote: >> >>> Use R. It includes Moran's I and Geary's C tests for >>> spatial-autocorrelation. Look like it has  mantel too. >>> >>> You'll probably need the sp, spdep and rgdal packages. You might >also >>> want to use the Raster package to extract the sampling data, or you >can >>> use spGRASS to tie the R and Grass together. >>> >>> See chapter 9 (1st ed) of Applied Spatial Data Analysis with R. >>> http://www.asdar-book.org/>>> >>> Enjoy, >>> Alex >>> >>> On 03/11/2014 09:18 AM, Tyler Smith wrote: >>>> Hello, >>>> >>>> We're preparing a field sampling program, and would like to >determine >>>> a minimum distance between samples to reduce/eliminate spatial >>>> autocorrelation. I think a good approach would be to calculate a >>>> mantel correlogram, and use the range of the correlogram as our >>>> minimum sampling distance. >>>> >>>> * Questions >>>> >>>> 1) is this a reasonable approach >>>> 2) if so, how best to do this? >>>> >>>> * Details >>>> We have a vector map with the point coordinates of several hundred >>>> potential sampling sites, and ~ 10 raster layers with appropriate >data >>>> to test for spatial autocorrelation (WORLDCLIM, soils). I could do >>>> something like the following, but I'm not sure if there's a simpler >or >>>> more appropriate approach: >>>> >>>> 1) extract the raster data for each point >>>> 2) save the data to csv; import into R >>>> 3) calculate the spatial distances between points, after projecting >>>> the lat-long data into an appropriate scale (?) >>>> 4) calculate the climate distance using the WORLDCLIM data >>>> 5) use the 'mgram' function in the 'ecodist' package to calculate >the >>>> actual correlogram between the spatial distance and climate >distance >>>> >>>> Any suggestions on the approach or the methods would be welcome! >>>> >>>> Thanks, >>>> >>>> Tyler > >> > >_______________________________________________ >grass-user mailing list >[hidden email] >http://lists.osgeo.org/mailman/listinfo/grass-user_______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 In reply to this post by Alex Mandel-2 I agree, there -IS- "No need to pass csv around" because using the R spgrass6 package, one can read/write GRASS vector and raster files directly from R, so there are no intermediate files. I do this "all the time" — incredibly powerful using GRASS & R together. TomOn Tue, Mar 11, 2014 at 1:08 PM, Alex Mandel wrote: You are right, I didn't read it that closely 1st time around. My point was that all of it can be done in R, and there are geospatial specific packages that have all the tests one might want. The bare minimum interaction is via rgdal or spgrass to pull data over from existing GRASS data sets. If the data isn't already in GRASS then rgdal one can read the original files directly. No need to pass csv around. Of course if it is in GRASS then you should have it all in the same projection already anyways if you put it all into the same mapset/location. The other book likely to have exactly what you want (field sampling design) is Ch 5. http://www.amazon.com/Spatial-Analysis-Ecology-Agriculture-Using/dp/1439819130/ref=la_B001K6MGR8_1_1?s=books&ie=UTF8&qid=1394557436&sr=1-1 Enjoy, Alex On 03/11/2014 09:58 AM, Thomas Adams wrote: > Alex, > > I believe Tyler does plan on using R for the statistical analyses, but > using GRASS GIS in combination with R is the easiest path, I think. > > Tom > > On Tuesday, March 11, 2014, Alex Mandel <[hidden email]> wrote: > >> Use R. It includes Moran's I and Geary's C tests for >> spatial-autocorrelation. Look like it has  mantel too. >> >> You'll probably need the sp, spdep and rgdal packages. You might also >> want to use the Raster package to extract the sampling data, or you can >> use spGRASS to tie the R and Grass together. >> >> See chapter 9 (1st ed) of Applied Spatial Data Analysis with R. >> http://www.asdar-book.org/ >> >> Enjoy, >> Alex >> >> On 03/11/2014 09:18 AM, Tyler Smith wrote: >>> Hello, >>> >>> We're preparing a field sampling program, and would like to determine >>> a minimum distance between samples to reduce/eliminate spatial >>> autocorrelation. I think a good approach would be to calculate a >>> mantel correlogram, and use the range of the correlogram as our >>> minimum sampling distance. >>> >>> * Questions >>> >>> 1) is this a reasonable approach >>> 2) if so, how best to do this? >>> >>> * Details >>> We have a vector map with the point coordinates of several hundred >>> potential sampling sites, and ~ 10 raster layers with appropriate data >>> to test for spatial autocorrelation (WORLDCLIM, soils). I could do >>> something like the following, but I'm not sure if there's a simpler or >>> more appropriate approach: >>> >>> 1) extract the raster data for each point >>> 2) save the data to csv; import into R >>> 3) calculate the spatial distances between points, after projecting >>> the lat-long data into an appropriate scale (?) >>> 4) calculate the climate distance using the WORLDCLIM data >>> 5) use the 'mgram' function in the 'ecodist' package to calculate the >>> actual correlogram between the spatial distance and climate distance >>> >>> Any suggestions on the approach or the methods would be welcome! >>> >>> Thanks, >>> >>> Tyler > _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 In reply to this post by Tyler Smith-2 On Tue, Mar 11, 2014 at 7:43 PM, Tyler Smith <[hidden email]> wrote: > Thanks for your suggestions. It looks like the R Borg is continuing to assimilate procedures that once required specialty software. Time to learn some new packages! Please consider to eventually add some short workflow here: http://grasswiki.osgeo.org/wiki/R_statisticsMore use cases are needed in this page in my view, would be great to have yours then. Best Markus _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 Markus,I can do that -- how do I make example datasets of mine available (which I would prefer, instead of using SPEARFISH or one of the other common datastes)?Tom On Sat, Mar 15, 2014 at 9:48 AM, Markus Neteler wrote: On Tue, Mar 11, 2014 at 7:43 PM, Tyler Smith <[hidden email]> wrote: > Thanks for your suggestions. It looks like the R Borg is continuing to assimilate procedures that once required specialty software. Time to learn some new packages! Please consider to eventually add some short workflow here: http://grasswiki.osgeo.org/wiki/R_statistics More use cases are needed in this page in my view, would be great to have yours then. Best Markus _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user
Open this post in threaded view
|

## Re: mantel correlogram

 Tom, On Sat, Mar 15, 2014 at 3:10 PM, Thomas Adams <[hidden email]> wrote: > Markus, > > I can do that -- how do I make example datasets of mine available (which I > would prefer, instead of using SPEARFISH or one of the other common > datastes)? if not too big and if having an open data license we could host them on an OSGeo server (incl. the GRASS server). Markus _______________________________________________ grass-user mailing list [hidden email] http://lists.osgeo.org/mailman/listinfo/grass-user