[R-sig-Geo] Difficulties plotting variofit() value

Paulo Justiniano Ribeiro Jr paulojus at c3sl.ufpr.br
Fri Mar 12 00:26:01 CET 2010


Christopher,
The reason is because there is no plot method for the variofit object.
(only lines). (Maybe it should have be...)

The ideia is then to overlay the fitted varigram on a empiralcal one
as in the following example:

require(geoR)
v <- variog(s100, max.dist=1.1)
plot(v)
vf <- variofit(s100)
lines(vf)

Paulo Justiniano Ribeiro Jr
LEG (Laboratorio de Estatistica e Geoinformacao)
Universidade Federal do Parana
Caixa Postal 19.081
CEP 81.531-990
Curitiba, PR  -  Brasil
Tel: (+55) 41 3361 3573
Fax: (+55) 41 3361 3141
e-mail: paulojus AT  ufpr  br
http://www.leg.ufpr.br/~paulojus



On Thu, 11 Mar 2010, Christopher D White wrote:

> Hello,
>
> I'm rather new on the list, so maybe a bit naive but educable.
>
> I entered an emperical variogram, a matrix of initial parameter vectors, etc., and ran variofit. The results appear reasonable in terms of the nugget and range (see the structure below). But when I try plot(ghf) it fails:
>> ghf
> variofit: model parameters estimated by WLS (weighted least squares):
> covariance model is: exponential
> parameter estimates:
>  tausq sigmasq     phi
> 31.5821 40.1984  1.6064
> Practical Range with cor=0.05 for asymptotic range: 4.812493
>
> variofit: minimised weighted sum of squares = 63.8023
>> plot(ghf)
> Error in plot.window(...) : need finite 'xlim' values
> In addition: Warning messages:
> 1: In min(x) : no non-missing arguments to min; returning Inf
> 2: In max(x) : no non-missing arguments to max; returning -Inf
> 3: In min(x) : no non-missing arguments to min; returning Inf
> 4: In max(x) : no non-missing arguments to max; returning -Inf
>
> If I fix(ghf), this is what it looks like:
>
> structure(list(nugget = 31.5820997227246, cov.pars = c(40.1983931188586,
> 1.60644948107876), cov.model = "exponential", kappa = 0.5, value = 63.8022691526071,
>    trend = "cte", beta.ols = 22.5254647252906, practicalRange = 4.81249254536764,
>    max.dist = 9.95561289775773, minimisation.function = "optim",
>    weights = "cressie", method = "WLS", fix.nugget = FALSE,
>    fix.kappa = TRUE, lambda = 0.333333333333333, message = "optim convergence code: 0",
>    call = quote(variofit(vario = gho, ini.cov.pars = covpars,
>        cov.model = covmod, weights = "cressie"))), .Names = c("nugget",
> "cov.pars", "cov.model", "kappa", "value", "trend", "beta.ols",
> "practicalRange", "max.dist", "minimisation.function", "weights",
> "method", "fix.nugget", "fix.kappa", "lambda", "message", "call"
> ), class = c("variomodel", "variofit"))
>
> Any clues?
>
> Thanks!
> Chris
>
> 	[[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
>



More information about the R-sig-Geo mailing list