[R-sig-Geo] How to do cross validation for universal kriging in Gstat

Kai Zhang nitmithv at yahoo.com.cn
Sun Feb 21 06:07:32 CET 2010

Dear all,

I am attempting several Kriging methods to interpolate temperature in a area. It works well for me to use krige.cv to conduct cross validation for ordinary kriging and gstat.cv for co-kriging. However, I am confused on how to conduct cv for universal kriging. The temperature data is from the data file 1 and the secondary variable with more intense sampling is from another file. Krige.cv does not provide a parameter on 'newdata'. When I was trying gstat.cv, the variogram function automatically fits cross-variogram after I incorporate both temperature and the secondary information into a gstat object. Any suggestions are welcome.

g <- gstat(NULL,id="Temp", formula=Temp~1, data=TMP)
g <- gstat(g,id="Ele", formula=Ele~1, data=ELE)
g <- gstat(g, id = "Temp", model = vgm(1, "Exp", 44559, 1))
x <- variogram(g)

Many thanks,
Kai Zhang


More information about the R-sig-Geo mailing list