[R-sig-Geo] gstat or geoR create variogram with sets of bounding boxes

Dr. Benedikt Gräler b.graeler at 52north.org
Wed May 24 12:17:02 CEST 2017


Dear Javier,

if I got you right, you seem to be looking for a "pooled estimation of 
within-strata variograms" as the help page on the function "variogram()" 
of gstat calls it. At first, define an indicator for each of your points 
that identifies the ID of the polygon it belongs to, then include it as 
regressor and set dX=0.5:

Try the example below for the meuse data set where only point-pairs of 
the same soil type (corresponding to your polygon Ids) are considered 
and then a pooled variogram is calculated.

HTH,

  Ben


library(sp)
library(gstat)

data(meuse)
coordinates(meuse) <- ~x+y

spplot(meuse, "zinc")
spplot(meuse, "soil")

vAll <- variogram(zinc~soil, meuse)
plot(vAll)

vWithinSoils <- variogram(zinc~soil, meuse, dX=0.5)
plot(vWithinSoils)




On 23/05/2017 17:23, Javier Moreira wrote:
> hi,
> im trying to make a variogram that consider a limit made by a bounding box,
> but not just one, but dividing the area of the hole set of points in
> different subzones (treatments in this case).
> I have tried to do so with bounding box in geoR, but i cant do it.
> Also, another way its to use anisotropy, but when try to put an alpha
> parameter in geostat, doesnt make any change that without it.
> bottom line, i have to perform a variogram that includes only the points in
> 1 direction, or, tell the variogram to limit the surface to a polygon (
> several ones)
> 
> if any one can help,
> thanks
> 

-- 
Dr. Benedikt Gräler
52°North Initiative for Geospatial Open Source Software GmbH
Martin-Luther-King-Weg 24
48155 Muenster, Germany

E-Mail: b.graeler at 52north.org
Fon: +49-(0)-251/396371-39
Fax: +49-(0)-251/396371-11

http://52north.org/
Twitter: @FiveTwoN

General Managers: Dr. Albert Remke, Dr. Andreas Wytzisk
Local Court Muenster HRB 10849
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b_graeler.vcf
Type: text/x-vcard
Size: 422 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20170524/c913cb64/attachment.vcf>


More information about the R-sig-Geo mailing list