spVariofit {spANOVA} | R Documentation |
Fit a variogram model
Description
Fit a parametric model to a variogram created by the function spVariog.
Usage
spVariofit(x, ...)
Arguments
x |
an object of class |
... |
further arguments to be passed to |
Details
This function is a wrapper to variofit
and can be used to fit a
parametric model to a variogram using either ordinary least squares or weighted least squares.
It takes as the main argument a spVariog object and others arguments should be passed
to ...
such as "cov.model" and so on.
Value
an object of class SpVariofit
which is a list containing the following
components:
mod |
an object of class |
data.geo |
an object of class geodata |
des.mat |
the design matrix |
trend |
a character specifying the type of spatial trend |
See Also
Examples
data("crd_simulated")
dados <- crd_simulated
#Geodata object
geodados <- as.geodata(dados, coords.col = 1:2, data.col = 3,
covar.col = 4)
h_max <- summary(geodados)[[3]][[2]]
dist <- 0.6*h_max
# Computing the variogram
variograma <- spVariog(geodata = geodados,
trend = "cte", max.dist = dist, design = "crd",
scale = FALSE)
plot(variograma, ylab = "Semivariance", xlab = "Distance")
# Spherical Model
ols1 <- spVariofit(variograma, cov.model = "spherical", weights = "equal",
max.dist = dist)
lines(ols1)
[Package spANOVA version 0.99.4 Index]