Skip to content

krige error

3 messages · Jon Olav Skoien, Matevz Pavlic

#
What i found out so far is that it has to be something with data...i raplaced just the column in other krige code and i got the same error. I also got :
Error in gstat.formula(d$formula, d$data) : 
  no response variable present in formula

Krigging data is as follows :
0%      10%      20%      30%      40%      50%      60%      70%      80%      90%     100% 
-351.960 -113.550 -103.130  -97.210  -90.970  -84.215  -75.032  -60.790  -42.740  -21.326  500.400

Can the negaiteve values have this effect?

regards, m
1 day later
#
It is difficult to know exactly what happens without seeing a 
reproducible example, but did you check the results of zerodist(DF) and 
DF[-zerodist(DF)[,1],]? The error below can come if there are no points 
that are within the limits of zerodist, not sure if the error in your 
first email could have a similar reason.

loadMeuse()
zerodist(meuse)
meuse[-zerodist(meuse)[,1],]
vmod = vgm(1, "Exp", 500, 0)
kres = krige(zinc~1, meuse[-zerodist(meuse)[,1],], meuse.grid, vmod)


Cheers,
Jon
On 20-Aug-11 17:13, Matev? Pavli? wrote:
#
Hi, thanks for the help. 

Class says as follows :
[1] "SpatialPointsDataFrame"
attr(,"package")
[1] "sp"
[1] "SpatialPixels"
attr(,"package")
[1] "sp

Anyway, the problem was, as Jan Olav Skoien  suggested, with the zerodist().

Tnx, m

-----Original Message-----
From: r-sig-geo-bounces at r-project.org [mailto:r-sig-geo-bounces at r-project.org] On Behalf Of Jon Olav Skoien
Sent: Monday, August 22, 2011 9:49 AM
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] krige error

It is difficult to know exactly what happens without seeing a reproducible example, but did you check the results of zerodist(DF) and DF[-zerodist(DF)[,1],]? The error below can come if there are no points that are within the limits of zerodist, not sure if the error in your first email could have a similar reason.

loadMeuse()
zerodist(meuse)
meuse[-zerodist(meuse)[,1],]
vmod = vgm(1, "Exp", 500, 0)
kres = krige(zinc~1, meuse[-zerodist(meuse)[,1],], meuse.grid, vmod)


Cheers,
Jon
On 20-Aug-11 17:13, Matev? Pavli? wrote:
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo