List Info

Thread: problem on trend surface calculation




problem on trend surface calculation
country flaguser name
Italy
2007-03-23 13:09:28
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,locati
on=meuse,degree=2)
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


-- 

Pierluigi De Rosa

Department of Enviromental & Civil engineering 
Faculty of Engineering 
Perugia (Italy)

_______________________________________________
statsgrass mailing list
statsgrassgrass.itc.it
http:
//grass.itc.it/mailman/listinfo/statsgrass

Re: problem on trend surface calculation
country flaguser name
Norway
2007-03-23 13:32:26
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.Bivandnhh.no

_______________________________________________
statsgrass mailing list
statsgrassgrass.itc.it
http:
//grass.itc.it/mailman/listinfo/statsgrass

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )