[R] Variograms of weighted data ONLY SEMI-R SPECIFIC
Bob Sandefur
rls at pincock.com
Tue Sep 26 15:20:48 CEST 2000
Hi
i
I have some
x y z weighting_factor value
.....
.....
Which I want to variogram (unweighted variogram(h)=0.5*average of squared difference of values separated by distance h)
I found one commerical package for this but they use a formula like
loop n samples
var(ilag) = var(ilag) + [(wtpti*gradepti)-(wtptj*gradeptj)]**2
wt(ilag) = wt(ilag) + (wtpi*wtpj)
end of loop
then
var(ilag) = var(ilag) * 0.5 / wt(ilag)
which scares me; consider the following data
x 1.0 1.1 5.0 5.1
wt 1 .0 .1 1 0.1
g 5 5 5 5
at lag of 4+or - 1gives
var=(1.0*5-1.0*5.0)^2+(1.0*5-0.1*5)^2+(0.1*5-1*5)^2+(0.1*5--0.1*5)^2
= 4.5^2+4.5^2=20.25+20.25=40.5
wt=1+0.1+0.1+1=2.2
gamma=40.5/2.2=18.41
and I was hoping variogram of a constant = 0
I would have guessed
loop n samples
var(ilag) =var(ilag) +((wtpti*wtptj)^n)* [(gradepti-gradeptj)]**2
wt(ilag) = wt(ilag) + (wtpi*wtpj)^n
end of loop
then
var(ilag) = var(ilag) * 0.5 / wt(ilag)
where n=0.5 (ie sqrt)
Questions:
Does anyone have any code, refereneces or opinons on/for variography of weighed data?
Failing that do any r functions or packages use averages of weighted squared differences?
Thanks
Bob Sandefur
Principal Geostatistician
Pincock, Allen and Holt, Inc.
International Mineral Consultants
274 Union Blvd Suite 200
Lakewood, CO
80224
USA
303 914-4467 v
303 987-8907 fax
rls at pincock.com
Does anyone have any code, refereneces or opinons on/for variography of weighed data>
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list