McClatchie, Sam (PIRSA-SARDI)
2006-May-19 03:16 UTC
[R] Cross correlation/ bivariate/ mantel
> Background: > OS: Linux Ubuntu Dapper > release: R 2.3.0 > editor: GNU Emacs 21.4.1 > front-end: ESS 5.2.3 > ----------------------------- > Colleagues >I have two spatial datasets (latitude, longitude, fish eggs) and (latitude, longitude, fish larvae) at the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets are spatially correlated. In other words, do high numbers of larvae occur where there are high numbers of eggs? I would like to calculate the cross correlation for these bivariate data and calculate a Mantel statistic as described on pg. 147 of Fortin and Dale 2005 "Spatial analysis". My search of R packages came up with acf and ccf functions but I don't think these are what I want. Does anyone know which spatial package I might find the appropriate test, please?> Best fishes > > Sam > ---- > Sam McClatchie, > Biological oceanography > South Australian Aquatic Sciences Centre > PO Box 120, Henley Beach 5022 > Adelaide, South Australia > email <mcclatchie.sam@saugov.sa.gov.au> > Cellular: 0431 304 497 > Telephone: (61-8) 8207 5448 > FAX: (61-8) 8207 5481 > Research home page <http://www.members.iinet.net.au/~s.mcclatchie/> > > /\ > ...>><xX(°> > //// \\\\ > <°)Xx><< > ///// \\\\\\ > ><(((°> > >><(((°> ...>><xX(°>O<°)Xx><< >[[alternative HTML version deleted]]
Sam, maybe you'll like to read about some environmetrics packages at http://cran.r-project.org/src/contrib/Views/Environmetrics.html or about more specific spatial analysis packages at http://cran.r-project.org/src/contrib/Views/Spatial.html Have a good reading and... good luck! Rogerio. ----- Original Message ----- From: "McClatchie, Sam (PIRSA-SARDI)" <mcclatchie.sam at saugov.sa.gov.au> To: <r-help at stat.math.ethz.ch> Sent: Friday, May 19, 2006 12:16 AM Subject: [R] Cross correlation/ bivariate/ mantel> Background: > OS: Linux Ubuntu Dapper > release: R 2.3.0 > editor: GNU Emacs 21.4.1 > front-end: ESS 5.2.3 > ----------------------------- > Colleagues >I have two spatial datasets (latitude, longitude, fish eggs) and (latitude, longitude, fish larvae) at the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets are spatially correlated. In other words, do high numbers of larvae occur where there are high numbers of eggs? I would like to calculate the cross correlation for these bivariate data and calculate a Mantel statistic as described on pg. 147 of Fortin and Dale 2005 "Spatial analysis". My search of R packages came up with acf and ccf functions but I don't think these are what I want. Does anyone know which spatial package I might find the appropriate test, please?> Best fishes > > Sam > ---- > Sam McClatchie, > Biological oceanography > South Australian Aquatic Sciences Centre > PO Box 120, Henley Beach 5022 > Adelaide, South Australia > email <mcclatchie.sam at saugov.sa.gov.au> > Cellular: 0431 304 497 > Telephone: (61-8) 8207 5448 > FAX: (61-8) 8207 5481 > Research home page <http://www.members.iinet.net.au/~s.mcclatchie/> > > /\ > ...>><xX(?> > //// \\\\ > <?)Xx><< > ///// \\\\\\ > ><(((?> > >><(((?> ...>><xX(?>O<?)Xx><< >[[alternative HTML version deleted]] --------------------------------------------------------------------------------> ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
RSiteSearch("mantel statistic") produced 27 hits for me, but the first few suggested I might not find enlightenment there. RSiteSearch("spatial statistics") returned 1064 hits, so I restricted that to RSiteSearch("spatial statistics", "functions"). The first of those was a director for the 'spdep' package. A search for "Mantel" on that page identified "plot.mc.sim: Mantel-Hubert spatial general cross product statistic". I haven't tried it. I know nothing more about it than what I've already told you. I hope you'll forgive the terrible pun if I say that I hope I not only gave you a fish, I showed you how I caught it. Best Wishes, Spencer Graves McClatchie, Sam (PIRSA-SARDI) wrote:>> Background: >> OS: Linux Ubuntu Dapper >> release: R 2.3.0 >> editor: GNU Emacs 21.4.1 >> front-end: ESS 5.2.3 >> ----------------------------- >> Colleagues >> > I have two spatial datasets (latitude,longitude, fish eggs) and (latitude, longitude, fish larvae) at the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasets are spatially correlated. In other words, do high numbers of larvae occur where there are high numbers of eggs? I would like to calculate the cross correlation for these bivariate data and calculate a Mantel statistic as described on pg. 147 of Fortin and Dale 2005 "Spatial analysis".> > My search of R packages came up withacf and ccf functions but I don't think these are what I want. Does anyone know which spatial package I might find the appropriate test, please?> >> Best fishes >> >> Sam >> ---- >> Sam McClatchie, >> Biological oceanography >> South Australian Aquatic Sciences Centre >> PO Box 120, Henley Beach 5022 >> Adelaide, South Australia >> email <mcclatchie.sam at saugov.sa.gov.au> >> Cellular: 0431 304 497 >> Telephone: (61-8) 8207 5448 >> FAX: (61-8) 8207 5481 >> Research home page <http://www.members.iinet.net.au/~s.mcclatchie/> >> >> /\ >> ...>><xX(?> >> //// \\\\ >> <?)Xx><< >> ///// \\\\\\ >> ><(((?> >> >><(((?> ...>><xX(?>O<?)Xx><< >> > > [[alternative HTML version deleted]] > > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
McClatchie, Sam (PIRSA-SARDI)
2006-May-23 00:31 UTC
[R] Cross correlation/ bivariate/ mantel
Thanks Spencer "Give a wo/man a fish and s/he becomes an aid dependent, give a wo/man a rod and s/he becomes a fisherman" Sam>-----Original Message----- >From: Spencer Graves [mailto:spencer.graves at pdf.com] >Sent: Tuesday, 23 May 2006 9:58 AM >To: McClatchie, Sam (PIRSA-SARDI) >Cc: r-help at stat.math.ethz.ch >Subject: Re: [R] Cross correlation/ bivariate/ mantel > > RSiteSearch("mantel statistic") produced 27 hits for >me, but the first few suggested I might not find enlightenment there. >RSiteSearch("spatial statistics") returned 1064 hits, so I >restricted that to RSiteSearch("spatial statistics", >"functions"). The first of those was a director for the >'spdep' package. A search for "Mantel" on that page >identified "plot.mc.sim: Mantel-Hubert spatial general cross >product statistic". I haven't tried it. I know nothing more >about it than what I've already told you. > > I hope you'll forgive the terrible pun if I say that >I hope I not only gave you a fish, I showed you how I caught it. > > Best Wishes, > Spencer Graves > >McClatchie, Sam (PIRSA-SARDI) wrote: >>> Background: >>> OS: Linux Ubuntu Dapper >>> release: R 2.3.0 >>> editor: GNU Emacs 21.4.1 >>> front-end: ESS 5.2.3 >>> ----------------------------- >>> Colleagues >>> >> I have two spatial datasets (latitude, >longitude, fish eggs) and (latitude, longitude, fish larvae) >at the same 280 stations (i.e. 280 cases). I want to determine >if the 2 datasets are spatially correlated. In other words, do >high numbers of larvae occur where there are high numbers of >eggs? I would like to calculate the cross correlation for >these bivariate data and calculate a Mantel statistic as >described on pg. 147 of Fortin and Dale 2005 "Spatial analysis". >> >> My search of R packages came up with >acf and ccf functions but I don't think these are what I want. >Does anyone know which spatial package I might find the >appropriate test, please? >> >>> Best fishes >>> >>> Sam >>> ---- >>> Sam McClatchie, >>> Biological oceanography >>> South Australian Aquatic Sciences Centre PO Box 120, Henley Beach >>> 5022 Adelaide, South Australia email >>> <mcclatchie.sam at saugov.sa.gov.au> >>> Cellular: 0431 304 497 >>> Telephone: (61-8) 8207 5448 >>> FAX: (61-8) 8207 5481 >>> Research home page <http://www.members.iinet.net.au/~s.mcclatchie/> >>> >>> /\ >>> ...>><xX(?> >>> //// \\\\ >>> <?)Xx><< >>> ///// \\\\\\ >>> ><(((?> >>> >><(((?> ...>><xX(?>O<?)Xx><< >>> >> >> [[alternative HTML version deleted]] >> >> >> >> >---------------------------------------------------------------------- >> -- >> >> ______________________________________________ >> R-help at stat.math.ethz.ch mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide! >> http://www.R-project.org/posting-guide.html >
McClatchie, Sam (PIRSA-SARDI <mcclatchie.sam <at> saugov.sa.gov.au> writes:> > Colleagues > > > I have two spatial datasets (latitude, longitude, fish eggs) and(latitude, longitude, fish larvae) at> the same 280 stations (i.e. 280 cases). I want to determine if the 2 datasetsare spatially correlated. In> other words, do high numbers of larvae occur where there are high numbers ofeggs? I would like to calculate> the cross correlation for these bivariate data and calculate a Mantelstatistic as described on pg. 147 of> Fortin and Dale 2005 "Spatial analysis". >Package ade4 has mantel.randtest and package vegan has mantel . Both functions find the Mantel statistic. If you need partial Mantel statistic, you can try partial.mantel in vegan or this code that I contributed some time ago: https://stat.ethz.ch/pipermail/r-help/2003-September/038985.html Marcelino de la Cruz Departamento de Biologia Vegetal Universidad Politecnica de Madrid Spain