[R-sig-Geo] krige.cv with nfold=1
Francois JOUVIE
francois.jouvie at supelec.fr
Wed Sep 17 14:44:33 CEST 2008
Hello All,
I'm using for the first time the gstat command krige.cv for cross
validation.
Having some problems to perform with my own data, I tried with the
data included with R which are often used in presentations (meuse data
more precisely).
Then I tried the following commands which all perform:
> data(meuse)
> m<-vgm(.5,"Sph",900,0.04)
> x<-krige.cv(log(zinc)~1,~x+y,meuse,m,nfold=5)
[using ordinary kriging]
[using ordinary kriging]
[using ordinary kriging]
[using ordinary kriging]
[using ordinary kriging]
>
But if I want nfold=1 (= not sub_divisions of the data ?) I get this
(in French) :
> x<-krige.cv(log(zinc)~1,~x+y,meuse,m,nfold=1)
Erreur dans gstat.formula(d$formula, d$data) :
no response variable present in formula
De plus : Warning messages:
1: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
2: In max(x) : aucun argument pour max ; -Inf est renvoyé
3: In min(x) : aucun argument trouvé pour min ; Inf est renvoyé
4: In max(x) : aucun argument pour max ; -Inf est renvoyé
>
What is happens ?
Thanks you very much if you can help me.
Francois
More information about the R-sig-Geo
mailing list