[R-sig-Geo] geoR nugget and coincident locations

Zev Ross zev at zevross.com
Tue Oct 30 21:25:23 CET 2007


Hi All,

At many monitoring locations we've taken two air quality samples. Rather than
simply average these values, I want to krige all the observations and
accommodate the different values at coincident locations by including
measurement error in the nugget. 

When I run the code based on geoR, though, I get an error that the coincident
locations may "cause crashes in some matrices operations" and I'm wondering if
someone could shed light on the issue -- is this what you'd expect with
coincident locations? Is the code below incorrectly specified?

Thank you, Zev

# ----set up the modelling and validation samples as geodata

model.a<-as.geodata(samples.hull, coords.col=c("x", "y"), 
	data.col="no2.ppb",
	covar.col=c("phase", "traffic)  )

validation.a<-as.geodata(samples.val, coords.col=c("x", "y"), 
	data.col="no2.ppb",
	covar.col=c("phase", "traffic) )

#-----use the modeling samples to estimate the variogram

myvario<-variog(model.a, option="bin",  
	breaks=seq(1,10000, by=300), maxdist=10000,
	trend=~phase+traffic)

#----- fit the variogram

myfit<-variofit(myvario, ini.cov.pars=c(15, 1000), 
	cov.model="spherical")

#----- set kriging to include a trend AND split 
#----- the nugget into micro and measurement

KC<-krige.control(type="ok", obj.model=myfit, micro=myfit$nugget/2,
	trend.d=trend.spatial(~phase+traffic, model.a),
	trend.l=trend.spatial(~phase+traffic, validation.a))

# ----krige 
mykrige<-krige.conv(model.a,locations=validation.a$coords, 
	krige=KC, output=output.control(signal=F) 

# here is the warning

krige.conv: model with covariates matrix provided by the user
krige.conv: Kriging performed using global neighbourhood 
Warning message:
Two or more pairs of data at coincident (or very close) locations. 
This may cause crashes in some matrices operations.
 in: varcov.spatial(coords = coords, cov.model = cov.model, kappa = kappa,




More information about the R-sig-Geo mailing list