Hello R list, I need to compute empirical variograms using data from a large geographic area (~10^6 km2). Although I could not find a specific reference, I assume that both geoR and gstat calculate distances among data points assuming points are on a flat surface (using the Pythagorean Theorem). Because the location of my data is large and located near the pole, assuming that latitude and longitude are coordinates on a flat surface would introduce a -possibly large- bias in the empirical variogram estimate. My questions are the following: a) Does geoR and gstat assume that points are on a flat surface? b) If I first calculate the distances among points using the Haversine formula, it is possible to calculate the variogram with a matrix of distances among points (where n is the number of observations) and a vector of observation values? Any help would be appreciated. Julian Julian M. Burgos Fisheries Acoustics Research Lab School of Aquatic and Fishery Science University of Washington 1122 NE Boat Street Seattle, WA 98105 Phone: 206-221-6864
On Tue, 8 Nov 2005, Julian Burgos wrote:> Hello R list, > I need to compute empirical variograms using data from a large > geographic area (~10^6 km2). Although I could not find a specific > reference, I assume that both geoR and gstat calculate distances among > data points assuming points are on a flat surface (using the Pythagorean > Theorem). Because the location of my data is large and located near the > pole, assuming that latitude and longitude are coordinates on a flat > surface would introduce a -possibly large- bias in the empirical > variogram estimate. My questions are the following: > > a) Does geoR and gstat assume that points are on a flat surface?Yes.> > b) If I first calculate the distances among points using the Haversine > formula, it is possible to calculate the variogram with a matrix of > distances among points (where n is the number of observations) and a > vector of observation values? >I don't think so. I suggest that you at least consider the fields package, partly because its disciplinary heritage makes large area coverage more natural, and because it has rdist.earth() and exp.earth.cov() functions. Whether it can do everything you need straightaway is another question, though.> Any help would be appreciated. > > Julian > > Julian M. Burgos > > Fisheries Acoustics Research Lab > School of Aquatic and Fishery Science > University of Washington > > 1122 NE Boat Street > Seattle, WA 98105 > > Phone: 206-221-6864 > > ______________________________________________ > 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 >-- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: Roger.Bivand at nhh.no
> -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch [SMTP:r-help-bounces at stat.math.ethz.ch] On Behalf Of Julian Burgos > Sent: Tuesday, November 08, 2005 10:41 PM > To: r-help at stat.math.ethz.ch > Subject: [R] Variograms and large distances > > Hello R list, > I need to compute empirical variograms using data from a large > geographic area (~10^6 km2). Although I could not find a specific > reference, I assume that both geoR and gstat calculate distances among > data points assuming points are on a flat surface (using the Pythagorean > Theorem). Because the location of my data is large and located near the > pole, assuming that latitude and longitude are coordinates on a flat > surface would introduce a -possibly large- bias in the empirical > variogram estimate. My questions are the following: > > a) Does geoR and gstat assume that points are on a flat surface? > > b) If I first calculate the distances among points using the Haversine > formula, it is possible to calculate the variogram with a matrix of > distances among points (where n is the number of observations) and a > vector of observation values? > > Any help would be appreciated. > > Julian > >Hi Julian, I suggest you transform your coordinates to UTM. I use Eino Uikannen's GeoConv program http://www.kolumbus.fi/eino.uikkanen/geoconvgb/index.htm but i believe there are packages and functions in R to carry out the transformation. GeoConv is a DOS program that runs in batch mode from the DOS console. Ruben