Dear list,
I would like to evaluate spatial dependence for about 10000 spatial data points. However, the variable associated with those points is not continuous as in the data "meuse" but is a land cover type (e.g. WATER). What should I consider as variable Z in the variogram() function with gstat? is it right to take the ID of each point as in the code below?
-----------------------------------------------------------------------------
Z <- data.frame[ which(data.frame$landcover=='WATER'),]$ID
X <- frame$X
Y <- frame$Y
mydata1 <- data.frame(Z, X, Y);
coordinates(mydata1) <- c("X", "Y");
vario01 <- variogram(Z~1, mydata1, cutoff=50000, alpha=c(0,45,90,135))
------------------------------------------------------------------------------
Any advice would be very appreciated. Thank you for your time,
Julien Beguin
------------------
Ph.D. student
Laval University
Qu?bec, Canada
variogram with nominal data
3 messages · Julien Beguin, ashton at msu.edu, Edzer Pebesma
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100611/fcaea2f6/attachment.pl>
1 day later
Indeed, the usual approach is to use multiple indicators. You'll find an example for different thresholds of a continuous variable in the end of the following demo script. library(gstat) demo(cokriging) -- Edzer
On 06/12/2010 05:16 AM, ashton at msu.edu wrote:
Hi Julian, and list, the variogram calculates the average squared difference between z-values separated by particular lags. Calculating differences with nominal data, and certainly IDs, is wrong. You will get results, but garbage in, garbage out applies here. That said, you can calculate indicator variograms on nominal data. See a recent paper by Ola Ahqvist and myself, or other papers, mostly in soil science. (What fun to self-cite!): Spatial and semantic dimensions of landscape heterogeneity, Landscape Ecology (2010). I don't think the gstat variogram functionality for nominal data extends to more than two binary classes, but is not hard to implement more than that. I have R script on my machine at work if you would be interested. Hope this helps, Ashton Shortridge Quoting Julien Beguin <julien.beguin.1 at ulaval.ca>:
Dear list,
I would like to evaluate spatial dependence for about 10000 spatial
data points. However, the variable associated with those points is
not continuous as in the data "meuse" but is a land cover type (e.g.
WATER). What should I consider as variable Z in the variogram()
function with gstat? is it right to take the ID of each point as in
the code below?
-----------------------------------------------------------------------------
Z <- data.frame[ which(data.frame$landcover=='WATER'),]$ID
X <- frame$X
Y <- frame$Y
mydata1 <- data.frame(Z, X, Y);
coordinates(mydata1) <- c("X", "Y");
vario01 <- variogram(Z~1, mydata1, cutoff=50000, alpha=c(0,45,90,135))
------------------------------------------------------------------------------
Any advice would be very appreciated. Thank you for your time,
Julien Beguin
------------------
Ph.D. student
Laval University
Qu?bec, Canada
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Weseler Stra?e 253, 48151 M?nster, Germany. Phone: +49 251 8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de http://www.52north.org/geostatistics e.pebesma at wwu.de