[R-sig-Geo] singular model fit

Tom Gottfried tom.gottfried at tum.de
Thu Sep 15 10:15:47 CEST 2011

Hi Javier,

Am 15.09.2011 09:40, schrieb Javier Leon Patino:
> Dear list,
> I am aware there are many post dealing with singular model variogram fits but I have not been able
> to fix my problem even after re-scaling the coordinates and variables.
> I am using fit.variogram(gstat) on the file ‘trans.csv’ (attached) and have tried several values for
> the range, sill and nugget and different models. The following gives me an ok variogram (from visual
> plot) but still a ‘singular model’ warning.
> library(sp)
> library(gstat)
> points <- read.csv("trans.csv")
> coordinates(points)=~x+y
> depth.ivgm <- vgm(model='Gau',range=1000, psill=var(points$ln_depth))

you use the variance of ln_depth as an estimate for the sill here. Thus, I suspect you want the 
variogram of ln_depth.

> depth.vgm <- fit.variogram(variogram(ln_depth~x+y, points), model=depth.ivgm)

What you calculate here with variogram() is a residual variogram of ln_depth from a first order 
trendsurface over your coordinates. Might that be the cause?


> Any ideas on why I am getting a singular fit? Is it the small number of samples used?
> Cheers,
> Javier
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Technische Universität München
Department für Pflanzenwissenschaften
Lehrstuhl für Grünlandlehre
Alte Akademie 12
85350 Freising / Germany
Phone: ++49 (0)8161 715324
Fax:   ++49 (0)8161 713243
email: tom.gottfried at wzw.tum.de

More information about the R-sig-Geo mailing list