Skip to content

geoR: error fitting a linear model

1 message · Andre Schützenmeister

#
Hi All,

Does anybody know how to fit a linear model to an empirical semivariogram?
Something just does not work out.

I have tried this:

# generate data
# compute empirical semivariogram
breaks=seq(.5,10,.5) )

# fit exponential model to 'esvg'
nugget=1e5)
variofit: model parameters estimated by WLS (weighted least squares):
covariance model is: exponential
parameter estimates:
      tausq     sigmasq         phi 
     0.0000 803538.4015     13.3603 
Practical Range with cor=0.05 for asymptotic range: 40.02385

variofit: minimised weighted sum of squares = 3.559216e+13

# fit linear model to 'esvg', and an error occurs
nugget=1e5)

Error in uniroot(findRange, interval = c(0, 50 * phi + 1), cm = cov.model,
: 
  f() values at end points not of opposite sign

I would appreciate any help. Thanks in advance.

Andre