[R-sig-Geo] Error with krige.cv

Edzer J. Pebesma e.pebesma at geo.uu.nl
Mon Oct 2 16:50:07 CEST 2006


Bertrand,

Several causes can lead to a singular covariance matrix; the most common is
that you have duplicate observations (i.e. two or more observations on the
same location). Use zerodist to find out.
--
Edzer

bertrand toupin wrote:
> Hi everyone, another obstacle towards the achievement :)
>
> I'm trying to do a kriging of my data on a regular grid.  My data is organized like :
>
> Donnees (the data matrix) 
>
> Period      x(km)   y(km)      Stations      z(m)
>     1          400      400           22.5          120
>     1          430      500             34.5           56
> etc....
>
> For each period, I have 2300 stations.  
>
> So for t=1,  I do :
>
> vario=variogram(Stations~1,loc=~x+y,Donnees[Donnees$Periode==t,],cutoff=150,width=10)
> modele1=fit.variogram(vario,vgm(max(vario[,3]),"Nug"),fit.method=1)
> Info$KO1nugget[t]= modele1$psill[1]
> valid=krige.cv(Stations~1,~x+y,model=modele1,data=Donnees[Donnees$Periode==t,]) 
> The last command, I got this error :
>
> " [using ordinary kriging]
>
> "chfactor.c", line 130: singular matrix in function LDLfactor()
> Erreur dans predict.gstat(object, newdata = data[sel, ], ...) : 
>         LDLfactor  "
>
> I tried a lot of things, but nothing worked.  Any idea?
>
> Thanks!
> Philippe
>
> N.B. sessionInfo() gives :
>  sessionInfo()
> Version 2.3.1 (2006-06-01) 
> i386-pc-mingw32 
>
> attached base packages:
> [1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"  "base"     
>
> other attached packages:
>    gstat    rgdal       sp 
> "0.9-31" "0.4-10" "0.8-20" 
>
>
>  		
> ---------------------------------
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list