[R-sig-Geo] variograms do not satisfy a legal model
Edzer J. Pebesma
e.pebesma at geo.uu.nl
Tue May 8 17:24:13 CEST 2007
Please try adding set in a call to create the gstat object:
g = gstat(... , set = list(nocheck = 1))
predict(g, newdata)
--
Edzer
ONKELINX, Thierry wrote:
> Edzer,
>
> Could you tell me how to override this check? I have been reading the
> helpfile but I can't find it.
>
> Thanks,
>
> Thierry
>
> ------------------------------------------------------------------------
> ----
> ir. Thierry Onkelinx
> Instituut voor natuur- en bosonderzoek / Reseach Institute for Nature
> and Forest
> Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
> methodology and quality assurance
> Gaverstraat 4
> 9500 Geraardsbergen
> Belgium
> tel. + 32 54/436 185
> Thierry.Onkelinx at inbo.be
> www.inbo.be
>
> Do not put your faith in what statistics say until you have carefully
> considered what they do not say. ~William W. Watt
> A statistical analysis, properly conducted, is a delicate dissection of
> uncertainties, a surgery of suppositions. ~M.J.Moroney
>
>
>
>
>> -----Oorspronkelijk bericht-----
>> Van: Edzer J. Pebesma [mailto:e.pebesma at geo.uu.nl]
>> Verzonden: maandag 7 mei 2007 17:00
>> Aan: ONKELINX, Thierry
>> CC: r-sig-geo at stat.math.ethz.ch
>> Onderwerp: Re: [R-sig-Geo] variograms do not satisfy a legal model
>>
>> Thierry, you'll have to find out what the linear model of
>> regionalization or intrinsic correlation mean; they are legal
>> models, meaning that they lead to predictions with guaranteed
>> non-negative prediction variances. There's a way to override
>> the check (meaning it will not stop on error) but not to get
>> that guarantee.
>> --
>> Edzer
>>
>> ONKELINX, Thierry wrote:
>>
>>> Dear useRs,
>>>
>>> I'm trying to do some cokriging. I try fit the variograms
>>>
>> with fit.lmc
>>
>>> (gstat package).
>>>
>>> #Problem 1: how to get the model in an elegant way into the gstat
>>> object? This is how I do it now.
>>> library("gstat")
>>> data(meuse)
>>> g <- gstat(id = "ln.zinc", formula = log(zinc)~1, locations = ~x+y,
>>> data = meuse) g <- gstat(g, id = "ln.lead", formula = log(lead)~1,
>>> locations = ~x+y, data = meuse) #fit the variogram models using
>>> fit.lmc model <- fit.lmc(variogram(g), g, model = vgm(.55,
>>>
>> "Sph", 900,
>>
>>> .05), fit.ranges = FALSE) g <- gstat(g, id = "ln.zinc", model =
>>> model[["model"]][["ln.zinc"]]) g <- gstat(g, id =
>>>
>> "ln.lead", model =
>>
>>> model[["model"]][["ln.lead"]]) g <- gstat(g, id = c("ln.zinc",
>>> "ln.lead"), model =
>>> model[["model"]][["ln.zinc.ln.lead"]])
>>> predict(g, newdata = meuse)
>>>
>>> #Problem 2. the gstat object doesn't accept different
>>>
>> ranges. Or am I
>>
>>> doing something wrong?
>>> library("gstat")
>>> data(meuse)
>>> g <- gstat(id = "ln.zinc", formula = log(zinc)~1, locations = ~x+y,
>>> data = meuse) g <- gstat(g, id = "ln.lead", formula = log(lead)~1,
>>> locations = ~x+y, data = meuse) # examine variograms and cross
>>> variogram:
>>> plot(variogram(g))
>>> # enter direct variograms:
>>> g <- gstat(g, id = "ln.zinc", model = vgm(.55, "Sph", 800,
>>>
>> .05)) g <-
>>
>>> gstat(g, id = "ln.lead", model = vgm(.55, "Sph", 900, .05)) # enter
>>> cross variogram:
>>> g <- gstat(g, id = c("ln.zinc", "ln.lead"), model = vgm(.47, "Sph",
>>> 900,
>>> .03))
>>> predict(g, newdata = meuse)
>>> # Error in predict.gstat(g, newdata = meuse) : gstat: value not
>>> allowed
>>> for: variograms do not satisfy a legal model
>>>
>>> Thanks,
>>>
>>> Thierry
>>>
>>>
>>>
>> ----------------------------------------------------------------------
>>
>>> --
>>> ----
>>> ir. Thierry Onkelinx
>>> Instituut voor natuur- en bosonderzoek / Reseach Institute
>>>
>> for Nature
>>
>>> and Forest Cel biometrie, methodologie en kwaliteitszorg / Section
>>> biometrics, methodology and quality assurance Gaverstraat 4 9500
>>> Geraardsbergen Belgium tel. + 32 54/436 185
>>>
>> Thierry.Onkelinx at inbo.be
>>
>>> www.inbo.be
>>>
>>> Do not put your faith in what statistics say until you have
>>>
>> carefully
>>
>>> considered what they do not say. ~William W. Watt A statistical
>>> analysis, properly conducted, is a delicate dissection of
>>> uncertainties, a surgery of suppositions. ~M.J.Moroney
>>>
>>> _______________________________________________
>>> 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