[R-sig-Geo] Fitting nested variograms to empirical variograms

Eliot McIntire emcintire at forestry.umt.edu
Thu Oct 14 18:50:30 CEST 2004


I am new to the list, but I have searched for an answer to this question  
in the list archives and couldn't find anything.

Does anybody have experience with fitting nested variogram models in R?  I  
am not having success.

I am trying fit a nested variogram to an empirical variogram.  I have  
tried both gstat and geoR which appear able to do this, but I have come  
across these problems:

geoR: I can only run nested variogram models using cov.spatial and this is  
not suitable to fit a model to an empirical variogram.  In the help manual  
it says that I should inherit cov.spatial in the variofit function,  
however, it does not seem to work.  I get:
Error in match.arg(cov.model, choices = c("matern", "exponential",  
"gaussian",  :
         there is more than one match in match.arg
my code: F2.1Y.wls.exp = variofit(F2.1Y, ini.cov.pars=starting.values,  
fix.nugget=F,  nugget=starting.values.vec, cov.model=c("exp","spherical"))

gstat: I can run nested models using
F2.BA1.fit = fit.variogram (F2.BA1.variogram, vgm(psill=33,"Lin",6, add.to  
= vgm(psill=33,"Lin",6, nugget=20) )
                 , print.SSE=T, fit.sills=T, fit.ranges=T )

but I never seem to get a good fit, i.e., it always fails to fit the  
empirical variogram.

If anyone has a solution, I also need to calculate the Residual Sums of  
Squares to test for the relative fit.

Thank you,

Eliot McIntire
NSERC Post Doctoral Fellow
Department of Ecosystems and Conservation Science
College of Forestry and Conservation
University of Montana, Missoula, MT 59812
fax: 406-243-4557
emcintire at forestry.umt.edu

More information about the R-sig-Geo mailing list