covariog               package:geoRglm               R Documentation

_E_m_p_i_r_i_c_a_l _C_o_v_a_r_i_o_g_r_a_m _f_o_r _a _M_o_d_e_l _w_i_t_h _l_o_g-_l_i_n_k _a_n_d _a_n _U_n_d_e_r_l_y_i_n_g _G_a_u_s_s_i_a_n _F_i_e_l_d

_D_e_s_c_r_i_p_t_i_o_n:

     Computes the sample empirical (sample) covariogram described in
     Christensen, Moller and Waagepetersen (2000).  Output is returned
     as a 'binned covariogram'.

_U_s_a_g_e:

     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)

_A_r_g_u_m_e_n_t_s:

 geodata: a list containing elements 'data' and 'coords' as described
          next. Typically an object of the class '"geodata"' - a *geoR*
          data set. If not provided the arguments 'data' and 'coords'
          must be provided instead. The list may also contain an
          argument 'units.m' as described below. 

  coords: an n x 2 matrix containing coordinates of the n data
          locations in each row. Default is 'geodata$coords', if
          provided. 

    data: a vector or matrix with data values. If a matrix is provided,
          each column is regarded as one variable or realization.
          Default is 'geodata$data', if provided. 

 units.m: n-dimensional vector of observation times for the data. By
          default ('units.m = "default"'), it takes 'geodata$units.m'
          in case this exist and else a vector of 1's.  

    uvec: a vector with values defining the covariogram binning. The
          values of 'uvec' defines the midpoints of the bins.
            If uvec[1] > 0 the first bin is: 0 < u <= uvec[2] -
          0.5*(uvec[2] - uvec[1]).
            If uvec[1] = 0 first bin is: 0 < u <= 0.5*uvec[2], and
          uvec[1] is replaced by the midpoint of this interval. 
            The default ('uvec = "default"') is that 
          uvec[i]=max.dist*(i-1)/14 for i=1,...,15.  

bins.lim: separating values for the binning. By default these values
          are defined via the argument of  'uvec'.  

estimator.type: '"poisson"' estimates the value hat{C}(0) using the
          Poisson assumption. '"not-poisson"' doesn't compute
          hat{C}(0). 

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. 

_D_e_t_a_i_l_s:

     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. 

     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(frac{1/|W_u^{Delta}|sum_{(i,j) in W_u^{Delta}} Y(x_i)*Y(x_j) /(t_i*t_j)}{(1/n sum_i Y(x_i)/t_i)^2}),   u > 0

     When a Poisson distribution is assumed, then

 hat{C}(0) = log(frac{1/n sum_i Y(x_i)*(Y(x_i)-1)/t_i^2}{(1/n sum_i Y(x_i)/t_i)^2}).

_V_a_l_u_e:

     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 'u'. When 'estimator.type = "poisson"', the first value in
          'v' is the estimate of sigma^2, hat{C}(0).  

      n : number of pairs in each bin. When 'estimator.type =
          "poisson"', the first value in 'n' is 'v0'.  

      v0: the estimate of sigma^2, hat{C}(0).  

bins.lim: Separating values for the binning provided in the function
          call.  

estimator.type: echoes the type of estimator used.  

    call: The function call.  

_A_u_t_h_o_r(_s):

     Ole F. Christensen olefc@birc.au.dk, 
      Paulo J. Ribeiro Jr. Paulo.Ribeiro@est.ufpr.br.

_R_e_f_e_r_e_n_c_e_s:

     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:
      <URL: http://www.daimi.au.dk/~olefc/geoRglm>.

_S_e_e _A_l_s_o:

     'covariog.model.env' for covariogram envelopes and
     'plot.covariogram' for graphical output.

_E_x_a_m_p_l_e_s:

     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)

