[R-sig-Geo] geoR -- bins in experimental semivariogram
Tom Gottfried
tom.gottfried at tum.de
Mon Apr 30 07:47:36 CEST 2012
Gema,
Am 29.04.2012 11:50, schrieb GEMA FERNANDEZ-AVILES CALDERON:
> Paulo, thank you very much for your reply.
>
> I think that it not possible to make an experimental semivariogram with
> distances, true?
> I would like to compute it because when we defined experimental
> semivariogram in a regular grid,
> we use "distances" and I would like to illustrate it.
The purpose of the semivariogram is to give semivariance as a function
of distance. Probably in most practical cases this is Euclidean distance
in two-dimensional space. So you might say that it is not possible to
make an experimental semivariogram WITHOUT distances.
> I tried the following sentence, but, as you said, it computes the mean
> value...
> Then, it is not possible to compute an experimental semivariogram with
> distances, like in
> the "cloud" case?
It seems you want to express something else than merely "distance" here.
I speculate you want to estimate semivariance at the discrete distances
occurring on your regular grid. The documentation says :"If an vector is
passed to the argument breaks its elements are taken as the limits of
the bins". Semivariance is calculated BETWEEN these limits. So you will
have to set the values in "breaks" BETWEEN the distances occurring in
your grid plus one smaller respectively greater than the distances
occurring in your grid. E.g.
breaks = c(0, 26, 40, 52, ...)
Beware that for the highest distances you only have few point pairs in
your bins (only two spanning the diagonals over your grid for the
extreme). Usually you can not expect a reliable semivariance estimate
from such few point pairs.
Tom
> Thanks in advance,
> Gema
>
> ##########################################################################
> bin2 <- variog(x, option = "bin" ,
> breaks = c(25, 35.35, 50, 55.90, 70.71, 75, 79.05, 90.13, 100,
> 103.07, 106.06, 111.80, 125, 141.42) , tolerance = 0)
>
> plot(bin2, lwd=2, main = "Classical estimator", xlim=c(0,150))
>
> ##########################################################################
>
>
>
>
>
> Gema Fernández-Avilés
>
> Department of Statistics
> Faculty of Law and Social Sciences
> University of Castilla-La Mancha at Toledo
>
> http://www.uclm.es/profesorado/gemafaviles/
>
>
>
> -----Mensaje original-----
> De: Paulo Justiniano Ribeiro Jr [mailto:paulojus at c3sl.ufpr.br]
> Enviado el: sáb 28/04/2012 17:01
> Para: GEMA FERNANDEZ-AVILES CALDERON
> CC: Tom Gottfried; r-sig-geo at r-project.org
> Asunto: Re: [R-sig-Geo] geoR -- bins in experimental semivariogram
>
> Gema
>
> the varigram distances are gruped in classes (simular to what is done with
> an histogram) and for each class the average semiveriance is computed
>
> geoR like many other software/packages have a default option
> (13 variogram points in geoR - probabily because this was written of
> friday.... ;) )
> You can however change this to other specification which may be
> more appropriate for your data.
>
> The argument "max.dist" sets a maximum distance (geoR takes all distances
> by
> default)
> the argument "uvec" allows you to specify a vector with the wanted
> distance classes
> (similarly to breaks in histogram)
>
> ?variog has more detais otherwise let me know
>
>
> Paulo Justiniano Ribeiro Jr
> LEG (Laboratorio de Estatistica e Geoinformacao)
> Universidade Federal do Parana
> Caixa Postal 19.081
> CEP 81.531-990
> Curitiba, PR - Brasil
> Tel: (+55) 41 3361 3573
> VOIP: (+55) (41) (3361 3600) 1053 1066
> Fax: (+55) 41 3361 3141
> e-mail: paulojus AT ufpr br
> http://www.leg.ufpr.br/~paulojus
>
> On Sat, 28 Apr 2012, GEMA FERNANDEZ-AVILES CALDERON wrote:
>
> > Dear Tom:
> >
> > I'm sorry if I have not formulate correctly the question.
> >
> > I am running this:
> >
> > #---------------------------------------------------
> > library(geoR)
> > x=read.table("Example.txt", header=TRUE)
> > class(x)
> >
> > x<-as.geodata(obj=x,coords.col = 1:2, data.col = 3)
> > plot(x)
> > points(x,col=grey(seq(1,0,l=14)), main = "Regular Grid")
> > cloud1 <- variog(x, option = "cloud")
> > bin1 <- variog(x, option = "bin" , tolerance = 0)
> >
> > # graphic
> >
> > plot(cloud1, main = "classical estimator" )
> > lines(bin1, type="p", lwd="4")
> > plot(bin1, lwd=2, main = "Classical estimator", xlim=c(0,150))
> > #---------------------------------------------------
> >
> > But, "bin1" has not contain 14 bins.
> > How can specify it in geoR? Could you help me?
> >
> > Thanks,
> > Gema
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Gema Fern?ndez-Avil?s
> >
> > Department of Statistics
> > Faculty of Law and Social Sciences
> > University of Castilla-La Mancha at Toledo
> >
> > http://www.uclm.es/profesorado/gemafaviles/
> >
> >
> >
> > -----Mensaje original-----
> > De: r-sig-geo-bounces at r-project.org en nombre de Tom Gottfried
> > Enviado el: vie 27/04/2012 12:28
> > Para: r-sig-geo at r-project.org
> > Asunto: Re: [R-sig-Geo] geoR -- bins in experimental semivariogram
> >
> > Please express in R what you have done
> > (see http://www.r-project.org/posting-guide.html)
> >
> > Am 27.04.2012 12:13, schrieb GEMA FERNANDEZ-AVILES CALDERON:
> >>
> >> Dear list:
> >>
> >> I have a 5x5 regular grid 100x100. When constructing the
> experimental semivariogram using gerR() I expected to have 14 different
> distances.
> >> However, I obtained 10 semivariogram points corresponding to 10 bins.
> >>
> >> - Which is exactly a bin?
> >
> > the lag class (an interval on the real line of distances over which the
> > semivariances are averaged).
> >
> >> - Which is the bin correspondence wiht the 14 initial distances.
> >
> > that depends on what you refer to with "14 initial distances".
> >
> >> - Why don't the first bin is not exactly 25?
> >
> > I suspect because you did not specify it that way (i.e. first lag class
> > corresponding to [0,25)).
> >
> > Tom
> >
> >> - The dataset is the following.
> >>
> >> Thanks in advance,
> >> Gema
> >>
> >> #########################################3
> >> x y dat
> >> 0 0 19.64253569
> >> 25 0 20.67413804
> >> 50 0 11.39907369
> >> 75 0 8.721311665
> >> 100 0 14.19476285
> >> 0 25 9.755908087
> >> 25 25 18.9788189
> >> 50 25 14.05059221
> >> 75 25 11.76423327
> >> 100 25 10.42562093
> >> 0 50 6.559737009
> >> 25 50 4.882232635
> >> 50 50 10.7619423
> >> 75 50 9.096456345
> >> 100 50 10.6894209
> >> 0 75 14.87976528
> >> 25 75 5.372505287
> >> 50 75 5.712214162
> >> 75 75 4.431458459
> >> 100 75 15.69477576
> >> 0 100 12.77014999
> >> 25 100 1.366809445
> >> 50 100 4.359141225
> >> 75 100 6.607783644
> >> 100 100 10.25674201
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> Gema Fern?ndez-Avil?s
> >>
> >> Department of Statistics
> >> Faculty of Law and Social Sciences
> >> University of Castilla-La Mancha at Toledo
> >>
> >> http://www.uclm.es/profesorado/gemafaviles/
> >>
> >> [[alternative HTML version deleted]]
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> R-sig-Geo at r-project.org
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
> > --
> > Technische Universit?t M?nchen
> > Department f?r Pflanzenwissenschaften
> > Lehrstuhl f?r Gr?nlandlehre
> > Alte Akademie 12
> > 85350 Freising / Germany
> > Phone: ++49 (0)8161 715324
> > Fax: ++49 (0)8161 713243
> > email: tom.gottfried at wzw.tum.de
> > http://www.wzw.tum.de/gruenland
> >
> > _______________________________________________
> > R-sig-Geo mailing list
> > R-sig-Geo at r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >
> > [[alternative HTML version deleted]]
> >
> >
>
--
Technische Universität München
Department für Pflanzenwissenschaften
Lehrstuhl für Grünlandlehre
Alte Akademie 12
85350 Freising / Germany
Phone: ++49 (0)8161 715324
Fax: ++49 (0)8161 713243
email: tom.gottfried at wzw.tum.de
http://www.wzw.tum.de/gruenland
More information about the R-sig-Geo
mailing list