[R-sig-Geo] predicting values from variofit function

Tom Gottfried tom.gottfried at wzw.tum.de
Wed Mar 9 22:39:47 CET 2011


Hi Anna,

Am 09.03.2011 21:25, schrieb Anna Gretschel:
> Dear List,
>
> I have fitted a spherical function to my variogram using "variofit(...)"
> from GeoR. Now I would like to predict some data with the function
> "predict(object,...)" from package stats.

Note that predict() is a generic function (see
http://cran.r-project.org/doc/manuals/R-intro.html#Object-orientation). 
I don't think there is a method in geoR that does what you want.

> Does anyone know wether this
> works and if it does how to do it?

The package gstat has a method for objects of class gstat (see ?gstat, 
?predict.gstat and the ASDAR book). You can coerce your variogram fit 
from geoR to the respective class used in package gstat with 
as.vgm.variomodel(). You can do kriging with krige.conv() from geoR too. 
But I think you have more options in gstat.

regards,
Tom

>
> Thanks a lot!
> Anna
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



More information about the R-sig-Geo mailing list