variogram model with gstat
Try: library(sp) demo(meuse,ask=F) library(gstat) m = meuse$zinc meuse$m = (meuse$zinc - mean(meuse$zinc))/sd(meuse$zinc) var(meuse$m) # [1] 1 variogram(m~1, meuse, cutoff=1e6)$gamma # [1] 1 you see that the semivariogram averaged over ALL distances equals the variance of the variable. What you look at is (for good reasons) the semivariogram computed up to a certain distance. Hth,
On 12/11/2013 06:17 PM, Moshood Agba Bakare wrote:
Dear All, I used gstat package of R to fit variogram model to experimental variogram having normalized the raw data as VN = (VP -VMean)/VSd Where VN is the normalized yield value, VP is the original yield value at sampling point, VMean is average yield value, and VSd is the standard deviation of yield value. The reason for normalization is to be able to assess the stability of spatial pattern of yield over a number of years. Having normalized the data, I expected the sill i.e. the variance of the data to be one but to my surprise the semivariogram plot shows sill of 0.8. What is responsible for this? The result of fitting exponential function showed a nugget effect of zero as showed below ## Exponential variogram model> exp.var<-vgm(psill = 0.8, model="Exp", range= 15, nugget= 0.1)> exp.mod<-fit.variogram(empvar,model=exp.var)> print(exp.mod) model psill range 1 Nug 0.0000000 0.00000 2 Exp 0.8066099 11.36279 Does it mean the exponential structure explained 100 percent of total variation in a normalized yield variable? I am confused! Have a look at the attached file for the semivariogram plot. Do I need to detrend before fitting the model? it seems the plot increases monotonically without level off. Please advise. Thank you Moshood
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/20131211/9cf448d0/attachment.bin>