[R-sig-Geo] How to do cross validation for universal kriging in Gstat
Edzer Pebesma
edzer.pebesma at uni-muenster.de
Sun Feb 21 17:51:42 CET 2010
Kai,
krige.cv(Temp~Ele, data, model)
should do the job, assuming that your primary variable of interest is
temperature.
--
Edzer
Kai Zhang wrote:
> 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
>
>
>
> __________________________________________________
> 赶快注册雅虎超大容量免费邮箱?
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster
Weseler Stra?e 253, 48151 Münster, Germany. Phone: +49 251
8333081, Fax: +49 251 8339763 http://ifgi.uni-muenster.de
http://www.52north.org/geostatistics e.pebesma at wwu.de
More information about the R-sig-Geo
mailing list