[R-sig-Geo] Cross variogram fitting

Edzer Pebesma edzer.pebesma at uni-muenster.de
Wed Dec 28 21:56:58 CET 2011


You might be stuck in a fit of perfectly correlated components; as the
documentation of fit.lmc suggests, you could try

g.fit = fit.lmc(v,g,fit.ranges = FALSE, correct.diagonal = 1.01)

but there might be other reasons. Without a reproducible example it's
only guessing I can do.
--
Edzer

On 12/28/2011 09:38 PM, Saman Monfared wrote:
> Dear all
> I want fitt a cross variogram with two covariables.
> 
> I have two problems.
> 
> 1)-How can I find the best model for cross variogram??
> 
> 2)-When I use fit.lmc() with fit.ranges = F or  fit.ranges = T it is
> non possituve
>  definite.
> 
> B is main variable and E,T are covariables.
> 
> coordinates(dd) <-~x+y
> g = gstat(NULL, "T", T~1, dd)
> g = gstat(g, "E", E~1, dd)
> g = gstat(g, "B", B~1,dd)
> v = variogram(g)
> g = gstat(g, model = vgm(1814.2042, "Lin",39061.93, 199.2033), fill.all= T)
> g.fit = fit.lmc(v,g,fit.ranges = F)
> plot(v, g.fit,type="b",col="black")
> but when I use
> predict.gstat(g.fit, dd)
> I faced with error
> ""non-positive definite coefficient matrix in structure 1non-positive
> definite coefficient
>  matrix in structure 2Warning: No Intrinsic Correlation or Linear
> Model of Coregionalization found""
> 

-- 
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.52north.org/geostatistics      e.pebesma at wwu.de



More information about the R-sig-Geo mailing list