An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100717/a395bb31/attachment.pl>
scale semivariance befor fit.variogram
4 messages · Samuel Turgeon, Paul Hiemstra, Edzer Pebesma
1 day later
On 07/17/2010 06:19 PM, Samuel Turgeon wrote:
Hi, I'm a new user of gstat, so my question is maybe very simple. I'm trying to fit a variogram with the function fit.variogram and I get this error message: Warning: singular model in variogram fit [1] "a possible solution MIGHT be to scale semivariances and/or distances" My data have values between 2.54e-10 et 2.56e-06. If I multiply my data by a constant in the semivariogram: vario=variogram(NASC*10000000~1,data,cutoff=1000) When I do this multiplication I'm able to fit a variogram. So my question is, Is it possible to this? Can I back transform (by a division) my predited values when the ordinary kriging will be done?
Hi Sam, It is possible, probably the covariance matrix has a lot of zeros because of rounding of your small values. Could this be linked to using single precision floats in gstat (edzer?)? I think there is no problem in 'backtransforming' your values, i.e. you only change the unit of the variable you are using (e.g. from milligram to microgram). Take care though that when predicting whilst using the fitted variogram model, your observations also need to be multiplied by this constant. My suggestion would be to multiply the data at the very beginning of the script, do all you analysis and at the very end do the division. You could also skip the division and present your results in the new unit. regards, Paul
Thanks! Sam [[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences University of Utrecht Heidelberglaan 2 P.O. Box 80.115 3508 TC Utrecht Phone: +3130 253 5773 http://intamap.geo.uu.nl/~paul http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20100719/87134f7c/attachment.pl>
The problem is not gstat using floats (it doesn't), it's roughly using the normal equations to solve a regression problem -- this calls for a sum of squared values matrix X'X, if the values then are too far apart, as it seems in your case, even double arithmetic runs into an explosion of numeric errors.
On 07/19/2010 05:44 PM, Samuel Turgeon wrote:
Thanks Paul, I understand that I can multiplied my data without problem but I'm still wondering why I have to this operation. Maybe it's about the precision floats in gstat like you said. regards, Sam 2010/7/19 Paul Hiemstra <p.hiemstra at geo.uu.nl>
On 07/17/2010 06:19 PM, Samuel Turgeon wrote:
Hi, I'm a new user of gstat, so my question is maybe very simple. I'm trying to fit a variogram with the function fit.variogram and I get this error message: Warning: singular model in variogram fit [1] "a possible solution MIGHT be to scale semivariances and/or distances" My data have values between 2.54e-10 et 2.56e-06. If I multiply my data by a constant in the semivariogram: vario=variogram(NASC*10000000~1,data,cutoff=1000) When I do this multiplication I'm able to fit a variogram. So my question is, Is it possible to this? Can I back transform (by a division) my predited values when the ordinary kriging will be done?
Hi Sam, It is possible, probably the covariance matrix has a lot of zeros because of rounding of your small values. Could this be linked to using single precision floats in gstat (edzer?)? I think there is no problem in 'backtransforming' your values, i.e. you only change the unit of the variable you are using (e.g. from milligram to microgram). Take care though that when predicting whilst using the fitted variogram model, your observations also need to be multiplied by this constant. My suggestion would be to multiply the data at the very beginning of the script, do all you analysis and at the very end do the division. You could also skip the division and present your results in the new unit. regards, Paul Thanks!
Sam
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
-- Drs. Paul Hiemstra Department of Physical Geography Faculty of Geosciences University of Utrecht Heidelberglaan 2 P.O. Box 80.115 3508 TC Utrecht Phone: +3130 253 5773 http://intamap.geo.uu.nl/~paul <http://intamap.geo.uu.nl/%7Epaul> http://nl.linkedin.com/pub/paul-hiemstra/20/30b/770
[[alternative HTML version deleted]]
_______________________________________________ R-sig-Geo mailing list R-sig-Geo at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/r-sig-geo
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