4

How can I find a measure of goodness of fit (let's say an R2) of a model fitted to a variogram by the function variofit using the geoR package?

The only value I have is the "minimised weighted sum of squares". Is it possible to obtain the R2 from this value? If so, how do I do that?

And, also, how do I find this same value in the case of a manual fit (using the eyefit function or manually specifying the parameters in the lines.variomodel function)?

  • Did you find a way to calculate r2? – user84884 Oct 21 '16 at 19:58
  • @Diana R^2 would be inappropriate and misleading. The fit needs to be better at short lags, for small values of the variogram, and for higher lag populations. This is why the package offers a weighted least squares procedure. – whuber Oct 23 '16 at 16:24
1

I think the goodness of fit measure you are looking for is a chi-squared. For which (I believe) your 'minimum weighted sum of squares' IS your goodness of fit statistic. Assuming this or this is what you are doing. Reading about the packages on CRAN can sometimes be helpful. This thread will also be relevant.

Or you could google: "calculate R2 weighted sum of squares" and find: https://stat.ethz.ch/pipermail/r-help/2006-August/111769.html

  • Thank you for your answer @Mox. I did refer to a "goodness of fit" but I am not interested in testing it with a chi-square test. My point is simpler, I just need to calculate the R2 value for the fit. Do you know how to do it? – Walter May 14 '16 at 3:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.