[R-sig-Geo] gstat error

Edzer Pebesma edzer.pebesma at uni-muenster.de
Tue Aug 12 21:06:16 CEST 2008



Dave Depew wrote:
> I suppose it might be, although I expanded the neighborhood just to be 
> sure. I wonder if it isn;t the NA values that are in the grid
I'd expect a different error message, or that the location gets ignored.

To select non-missing valued pixels, you can select cells if the grid is 
a SpatialPixelsDataFrame, using e.g.

 > data(meuse.grid)
 > coordinates(meuse.grid) = ~x+y
 > gridded(meuse.grid)=TRUE
 > class(meuse.grid)
[1] "SpatialPixelsDataFrame"
attr(,"package")
[1] "sp"
 > summary(meuse.grid[meuse.grid$dist < 0.5, ])

where you replace the row selection with the is.na() on the appropriate 
column.
--
Edzer

>
> Edzer Pebesma wrote:
>> Is it possible that you're using kriging in a local neighbourhood 
>> where the predictor is constant?
>> -- 
>> Edzer
>>
>> Dave Depew wrote:
>>> Hi
>>> I'm trying to run some universal kriging, and have not experienced 
>>> this error before.
>>> I've removed duplicate data locations using the remove.duplicates 
>>> command. The data set runs fine if the formula is set as ordinary 
>>> kriging, but adding in a predictor (which is already known at each 
>>> grid location)
>>> gives
>>>
>>> "lufactor.c", line 207: singular matrix in function m_inverse()
>>> Error in predict.gstat
>>>
>>> Any ideas?
>>>
>>> _______________________________________________
>>> R-sig-Geo mailing list
>>> R-sig-Geo at stat.math.ethz.ch
>>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>
>

-- 
Edzer Pebesma
Institute for Geoinformatics (ifgi), University of Münster,
Weseler Straße 253, 48151 Münster, Germany.  Phone: +49 251
8333081, Fax: +49 251 8339763  http://ifgi.uni-muenster.de/




More information about the R-sig-Geo mailing list