| covariog {geoRglm} | R Documentation |
Computes the sample empirical (sample) covariogram described in Christensen, Moller and Waagepetersen (2000).
Output is returned as a binned covariogram. The function is NOT
a general function for computing the covariogram, and it is in fact of
very limited use.
covariog(geodata, coords = geodata$coords, data = geodata$data,
units.m = "default", uvec = "default", bins.lim = "default",
estimator.type = c("poisson", "not-poisson"),
max.dist = NULL, pairs.min = 2)
geodata |
a list containing elements |
coords |
an |
data |
a vector or matrix with data values.
If a matrix is provided, each column is regarded as one variable or realization.
Default is |
units.m |
|
uvec |
a vector with values defining the covariogram binning. The
values of |
bins.lim |
separating values for the binning. By default these values are defined via the argument of
|
estimator.type |
|
max.dist |
a number defining the maximal distance for the covariogram. Pairs of locations separated by a larger distance than this value are ignored in the covariogram calculation. Default is the maximum distance between pairs of data locations. |
pairs.min |
An integer number defining the minimum number of pairs for the bins. Bins with number of pairs smaller than this value are ignored. |
Covariograms can be used in geostatistical analysis for exploratory purposes, to estimate covariance parameters and/or to compare theoretical and fitted models against the empirical covariogram.
The covariogram computed by this function assumes a specific model, a spatial GLMM, and furthermore it assumes that the link-function is the logarithm (i.e. it should not be used for the binomial-logistic model !).
Assume that the conditional distribution of Y_i given S_i
has mean t_i\exp(S_i), where the values of t_i are given in units.m.
The estimator implemented is
\hat{C}(u) = \log\left(\frac{\frac{1}{|W_u^{\Delta}|}
\sum_{(i,j)\in W_u^{\Delta}} Y(x_i) Y(x_j) /(t_i t_j)}{\left(\frac{1}{n}\sum_{i=1}^nY(x_i)/t_i\right)^2}\right), \ \ u > 0
When a Poisson distribution is assumed, then
\hat{C}(0) = \log\left(\frac{\frac{1}{n}\sum_{i=1}^nY(x_i)(Y(x_i)-1)/t_i^2}{\left(\frac{1}{n}\sum_{i=1}^nY(x_i)/t_i\right)^2}\right)
An object of the class covariogram which is a
list with the following components:
u |
a vector with distances. |
v |
a vector with estimated covariogram values at distances given
in |
n |
number of pairs in each bin. When |
v0 |
the estimate of |
bins.lim |
Separating values for the binning provided in the function call. |
estimator.type |
echoes the type of estimator used. |
call |
The function call. |
Ole F. Christensen OleF.Christensen@agrsci.dk,
Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br.
Christensen, O. F., Moller, J. and Waagepetersen R. (2000). Analysis of spatial data using generalized linear mixed models and Langevin-type Markov chain Monte Carlo. Research report R-00-2009, Aalborg University.
Further information about geoRglm can be found at:
http://gbi.agrsci.dk/~ofch/geoRglm.
covariog.model.env for
covariogram envelopes and plot.covariogram for graphical
output.
data(p50)
covar <- covariog(p50, uvec=c(1:10))
plot(covar)
## Now excluding the bin at zero (only assuming log-link).
covar2 <- covariog(p50,uvec=c(1:10), estimator.type="no")
plot(covar2)