On Wed, 11 Apr 2007, temiz wrote: > hello > > I wonder how I can create trend surface with gstat? > > can you supply an example ?
?gstat x <- gstat(..., degree=2) predict(x, newdata=...) for a quadratic surface. library(gstat) data(meuse) coordinates(meuse) <- c("x", "y") data(meuse.grid) coordinates(meuse.grid) <- c("x", "y") gridded(meuse.grid) <- TRUE x <- gstat(formula=zinc ~ 1, data=meuse, degree=2) res <- predict(x, newdata=meuse.grid) spplot(res, "var1.pred") Roger > > regards > > > > -- Roger Bivand Economic Geography Section, Department of Economics, Norwegian School of Economics and Business Administration, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [EMAIL PROTECTED] _______________________________________________ R-sig-Geo mailing list R-sig-Geo@stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo