On Fri, 23 Mar 2007, Pierluigi De Rosa wrote:
> Dear all,
>
> I wont to try to define a trend surface, now I'm just
tring with meude
> dataset to learn it but I have an error. I do this:
>
>
gs<-gstat(id="zinc.uk",formula=zinc~x+y,locatio
n=meuse,degree=2)
Try:
> library(gstat)
Loading required package: sp
> data(meuse)
> coordinates(meuse) <- c("x",
"y")
> data(meuse.grid)
> coordinates(meuse.grid) <- c("x",
"y")
> gridded(meuse.grid) <- TRUE
> gs <- gstat(id="zinc.uk", formula=zinc ~
1, data=meuse, degree=2)
> pgs <- predict.gstat(gs, newdata=meuse.grid)
[ordinary or weighted least squares prediction]
degree= and the coordinates x+y given explicity will lead to
collinearity.
It also seems that you cannot mix a trend surface and extra
predictors.
Roger
> then
> pgs=predict.gstat(gs,newdata=meuse.grid)
>
> but I have this error:
> polynomial degree only works when no other predictors
are given
>
> It seems everythink fine but I don't know where I
wrong...
> Can anyone help me??
> Thaks
> Pierluigi
>
>
>
--
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: Roger.Bivand nhh.no
_______________________________________________
statsgrass mailing list
statsgrass grass.itc.it
http:
//grass.itc.it/mailman/listinfo/statsgrass
|