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

Zev Ross zev at zevross.com
Wed Dec 10 20:03:57 CET 2008


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
>




More information about the R-sig-Geo mailing list