back with cutoff/variogram question
Erin, it is in https://r-forge.r-project.org/scm/viewvc.php/pkg/src/sem.c?view=markup&root=gstat file sem.c, line 692 defaults.h defines: #define DEF_fraction 0.33333 /* fraction of max_dist for def. cutoff */ which is the default value for gl_fraction. The default number of lag classes is 15 (gl_n_intervals). You can change these defaults to e.g. 0.5 and 25 by: variogram(gstat(NULL, "zinc", zinc~1, meuse, set=list(fraction=.5,intervals=25)))
On 11/24/2013 04:53 PM, Hodgess, Erin wrote:
Hi! This is from the gstat variogram. I tried to track this down via the vario.c function, but I'm having some trouble with it.
________________________________________
From: b.rowlingson at gmail.com [b.rowlingson at gmail.com] on behalf of Barry Rowlingson [b.rowlingson at lancaster.ac.uk]
Sent: Sunday, November 24, 2013 3:08 AM
To: Hodgess, Erin
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] back with cutoff/variogram question
On Sun, Nov 24, 2013 at 5:46 AM, Hodgess, Erin <HodgessE at uhd.edu> wrote:
Hello again.
I'm back with the variogram question. Here is the info from the help file:
cutoff: spatial separation distance up to which point pairs are
included in semivariance estimates; as a default, the length
of the diagonal of the box spanning the data is divided by
three.
By the box spanning the data, does that mean the bounding box, please? If so, wouldn't that just be 2, please?
There's quite a few 'variogram' functions in various R packages so it
might help if you told us which one!
I should think that "the box spanning the data" is indeed the
bounding box. I don't see what you think would be '2' in this case
though, unless the diagonal length of the bounding box happened to be
6.
For data that included points at (0,0) and (1,1) the diagonal would
have length sqrt(2) and so the cutoff default should be sqrt(2)/3.
Note you have to actually have points at those coordinates and not
just generate 1000 random points in the unit square.
A few simple experiments with simulated point data sets with various
bounding boxes should confirm this, or you could just look at the
code?
Barry
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Edzer Pebesma Institute for Geoinformatics (ifgi), University of M?nster Heisenbergstra?e 2, 48149 M?nster, Germany. Phone: +49 251 83 33081 http://ifgi.uni-muenster.de GPG key ID 0xAC227795 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 555 bytes Desc: OpenPGP digital signature URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20131124/6716903c/attachment.bin>