madogram and rodogram

If you have problems using RGeostats package or if you simply need some help on an unlisted subject.

madogram and rodogram

Postby Jeffrey Yarus » Tue May 14, 2024 9:46 pm

I understand we are migrating to gstlearn, but I have an RGeostats question on fitting madograms or rodograms. It appears that model.auto does not seem to work with madograms, so I am using model.fit. It also doesn't seem to work. I get an error message, "Error in model.input(ndim = ndim, nvar = nvar, flag.sill = flag.sill, :
could not find function "model.input". Here is my code:

madfit <- # madfit is the name I want to assign for the modeled madogram
model.fit(
mad_Omni, # the name of the experimental variogram model I wish to fit - created in earlier code
struct = struct, # struct = the exponential variogram - assigned in earlier code
flag.fit = TRUE,
draw = TRUE,
verbose = 1,
title = paste(property, "Madogram Model Omnidirectional"),
# pos.legend = 1,
xlab = "Lag distance",
ylab = expression(paste("Variance (", gamma, "(h))", sep = ""))
)

Where am I going wrong?
Jeffrey Yarus
 
Posts: 49
Joined: Wed Jun 26, 2019 9:39 pm

Re: madogram and rodogram

Postby Didier Renard » Thu May 16, 2024 7:02 am

Hi Jeffrey
I already sent the same information by previous mail regarding the (im)possibility to fit an experimental Madogram or Rodogram.
Let us recall the basics of the Variogram and all others.
Per lag:
- the Variogram performs the average of (z_1 - z_2)^2 (up to constant)
- the Madogram performs the average of |z_1 - z_2| (hence the name: mean absolute difference)
- the Rodogram performs the average of (|z_1 - z_2|)^1/2 (hence the name: Rott Square of absolute difference)
- one could even think of a InvPowGram_alpha which would perform the average of (|z_1 - z_2|)^1/alpha

All these quantites CAN BE calculated experimentally: the shape of the variogram is continuously smoother and smoother, which tends to a curve which should be easier to fit!

But to fit with what: with a genuine covariance function (turned upside-down into a variogram)? This would be a nonsense as a Madogram, Rodogram and other are not consistent with a covariance or variogram calculation !
Anyhow, using one of these funny models (say established by fitting a Madogram) would be refused at the Kriging step, just for consistency reasons.
So, we found it safer to FORBID the possibility of fitting Madogram, Rodogram and others in the Automatic Variogram Fitting module.

Let us mention that:
- you should rapidly turn from RGeostats into gstlearn (https://gstlearn.org/)
- in the latter, we can assert that EXPERTS could turn the "madogram" flag into a "variogram" flag just before running the fitting exercise and return to the initial value afterwards. Of course, WE WOULD NOT RECOMMEND THIS TRICK.

Hope this will help.
Didier Renard
 
Posts: 338
Joined: Thu Sep 20, 2012 4:22 pm


Return to Other Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron