[R-sig-Geo] GSTAT - singular in meters not km

Edzer Pebesma edzer.pebesma at uni-muenster.de
Thu Dec 11 13:17:01 CET 2008


Thanks for the reproducalbe example, Zev;

the whole thing looks very strange to me; it seems to be the combination 
of very large distance values and very small semivariance values that 
triggers this -- when I multiply v$gamma with 1000, many different 
initial variogram values are fit without problems again. Something 
someone (that's usually me) will have to look into more closely, I'm afraid!

Best regards,
--
Edzer

Zev Ross wrote:
> Edzer (and all),
>
> I don't think that it's related to an unrealistic range. I've tried a 
> lot of different realistic and non-realistic values and get singular 
> results each time. If I divide the X and Y coordinates by 10, 100, 
> 1000 or 10000 I don't get singularity. Using Lat and Long works fine. 
> Code is below and I included a link to a workspace with the "pol" data 
> set at the bottom.
>
> Zev
>
> polA<-pol
> coordinates(polA)<-~x+y
> v<-variogram(pollutant~1, data=polA)
> v.fit<-fit.variogram(v, vgm(0.0005, "Sph", 40000, 0.00001))
> attributes(v.fit)$singular # TRUE
>
> polB<-pol
> polB$x<-polB$x/1000
> polB$y<-polB$y/1000
> coordinates(polB)<-~x+y
> v<-variogram(pollutant~1, data=polB)
> v.fit<-fit.variogram(v, vgm(0.0005, "Sph", 40, 0.00001))
> attributes(v.fit)$singular #FALSE
>
> polC<-pol
> coordinates(polC)<-~longitude+latitude
> v<-variogram(pollutant~1, data=polC)
> v.fit<-fit.variogram(v, vgm(0.0005, "Sph", .4, 0.00001))
> attributes(v.fit)$singular # FALSE
>
> http://www.zevross.com/temp2/singular_or_not.RData
>
> Edzer Pebesma wrote:
>> Hi Zev, it is hard to see what happens without seeing your data or R 
>> commands.
>>
>> Is it possible that you passed an unrealistic value for the range 
>> parameter, as starting value for the variogram model argument of 
>> fit.variogram?
>> -- 
>> Edzer
>>
>> Zev Ross wrote:
>>> Hi All,
>>>
>>> I'm fitting variograms in GSTAT with fit.variogram and I was 
>>> surprised to find that all my fits were singular. I experimented 
>>> with converting the data to unprojected data (decimal degrees) and 
>>> with dividing my X and Y coordinates, which are in meters, by 1000 
>>> (to get KM). In both cases the fitting procedure worked with no 
>>> singularity. Based on the numbers of pairs the bins appeared to be 
>>> about the same so it appears to be a matter of the coordinates 
>>> themselves.
>>>
>>> I'd prefer not to have to convert the coordinates back and forth 
>>> between meters and KM, any suggestions?
>>>
>>> Zev
>>>
>>> _______________________________________________
>>> 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/
http://www.springer.com/978-0-387-78170-9 e.pebesma at wwu.de




More information about the R-sig-Geo mailing list