Nugget from variogram.fit vs GLS
Hi All,
I'm verifying coefficients generated with GSTAT kriging with external
drift using GLS. The coefficients match absolutely perfectly. The range
also matches perfectly. But there is a big difference in what GLS gives
as the output for the nugget. Can anyone explain why this is?
Zev
###### KED
# here's where I fit the variogram and the fit output
v.fit = fit.variogram(v, vgm(1.5, "Exp", 20, 0.5))
> v.fit
model psill range
1 Nug 1.302310 0.0000000
2 Exp 1.413246 0.8098587
# the fit is used in a KED model
g = gstat(formula=formula(MODEL), data = so2, model = v.fit)
# here I get the coefs (these coefs match those from GLS below perfectly)
UKcoef<-predict(g, lattice, BLUE=c(TRUE,TRUE))
###### GLS
# use the same parameters as above and fix them
nug<-v.fit[1,2] # this is 1.302
sill<-v.fit[1,2]+v.fit[2,2]
range<-v.fit[2,3]
theGLS<-gls(formula(so2FinalAll), data=so2, na.action=na.omit,
correlation=corExp(c(range, nug/sill ),
form=~X+Y, nugget=TRUE,fixed=TRUE), method="ML")
> summary(theGLS)
Generalized least squares fit by maximum likelihood
Model: formula(so2FinalAll)
Data: so2
AIC BIC logLik
578.6551 593.7083 -284.3275
Correlation Structure: Exponential spatial correlation
Formula: ~X + Y
Parameter estimate(s):
range nugget
0.8098587 0.4795740
# note the nugget of 0.479 vs the 1.302 above.
Zev Ross ZevRoss Spatial Analysis 120 N Aurora, Suite 3A Ithaca, NY 14850 607-277-0004 (phone) 866-877-3690 (fax, toll-free) zev at zevross.com