3 Exploratory Tools

A quick summary for the geodata object can be obtained using a method for summary which will return a information on the coordinates and data values.


  > summary(s100)


  Number of data points: 100
  
  Coordinates summary
          Coord.X    Coord.Y
  min 0.005638006 0.01091027
  max 0.983920544 0.99124979
  
  Distance summary
          min         max
  0.007640962 1.278175109
  
  Data summary
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
  -1.1680  0.2730  1.1050  0.9307  1.6100  2.8680
  
  Other elements in the geodata object
  [1] "cov.model" "nugget"    "cov.pars"  "kappa"
  [5] "lambda"

The elements of the list $covariate, $borders and/or units.m will be also summarized if present in the geodata object.

3.1 Plotting data locations and values

The function plot.geodata shows a 2 × 2 display with data locations (top plots) and data versus coordinates (bottom plots). For an object of the class geodata the command plot(s100) produce the output shown in Figure 3.1.


pict

Figure 1: Plot produced by plot.geodata.

The function points.geodata produces a plot showing the data locations. Alternatively, points indicating the data locations can be added to a current plot. There are options to specify point sizes, patterns and colors, which can be set to be proportional to the data values or specified quantiles. Some examples of graphical outputs are illustrated by the commands below and corresponding plots as shown in Figure 3.1.


  > par(mfrow = c(2, 2))
  > points(s100, xlab = "Coord X", ylab = "Coord Y")
  > points(s100, xlab = "Coord X", ylab = "Coord Y",
  +     pt.divide = "rank.prop")
  > points(s100, xlab = "Coord X", ylab = "Coord Y",
  +     cex.max = 1.7, col = gray(seq(1, 0.1, l = 100)),
  +     pt.divide = "equal")
  > points(s100, pt.divide = "quintile", xlab = "Coord X",
  +     ylab = "Coord Y")

pict
Figure 2: Plot produced by points.geodata.

3.2 Empirical variograms

Empirical variograms are calculated using the function variog. There are options for the classical or modulus estimator. Results can be returned as variogram clouds, binned or smoothed variograms. There are methods for plot to facilitate the display of the results as shown in Figure 3.


  > cloud1 <- variog(s100, option = "cloud", max.dist = 1)
  > cloud2 <- variog(s100, option = "cloud", estimator.type = "modulus",
  +     max.dist = 1)
  > bin1 <- variog(s100, uvec = seq(0, 1, l = 11))
  > bin2 <- variog(s100, uvec = seq(0, 1, l = 11),
  +     estimator.type = "modulus")
  > par(mfrow = c(2, 2))
  > plot(cloud1, main = "classical estimator")
  > plot(cloud2, main = "modulus estimator")
  > plot(bin1, main = "classical estimator")
  > plot(bin2, main = "modulus estimator")

pict
Figure 3: Ploting of variog results.

Several results are returned by the function variog. The first three are the more important ones and contains the distances, the estimated semivariance and the number of pairs for each bin.


  > names(bin1)


   [1] "u"                "v"
   [3] "n"                "sd"
   [5] "bins.lim"         "ind.bin"
   [7] "var.mark"         "beta.ols"
   [9] "output.type"      "max.dist"
  [11] "estimator.type"   "n.data"
  [13] "lambda"           "trend"
  [15] "pairs.min"        "nugget.tolerance"
  [17] "direction"        "tolerance"
  [19] "uvec"             "call"

Furthermore, the points of the variogram clouds can be grouped into classes of distances ("bins") and displayed with a box-plot for each bin as shown in Figure 3.2. This can be used as an exploratory tool to access variogram results.


  > bin1 <- variog(s100, uvec = seq(0, 1, l = 11),
  +     bin.cloud = T)
  > bin2 <- variog(s100, uvec = seq(0, 1, l = 11),
  +     estimator.type = "modulus", bin.cloud = T)
  > par(mfrow = c(1, 2))
  > plot(bin1, bin.cloud = T, main = "classical estimator")
  > plot(bin2, bin.cloud = T, main = "modulus estimator")

pict
Figure 4: Box-plots for each of the variogram bins.

Directional variograms can also be computed by the function variog using the arguments ‘direction’ and ‘tolerance’. For example, to compute a variogram for the direction 60 degrees with the default tolerance angle (22.5 degrees) the command would be:


  > vario60 <- variog(s100, max.dist = 1, direction = pi/3)

For a quick computation in four directions we can use the function variog4 which by default computes variogram for the direction angles 0o, 45o, 90o and 135o.


  > vario.4 <- variog4(s100, max.dist = 1)

The Figure 5 show the directional variograms obtained with the commands above.



  > par(mfrow = c(1, 2), mar = c(3, 3, 1.5, 0.5))
  > plot(vario60)
  > title(main = expression(paste("directional, angle = ",
  +     60 * degree)))
  > plot(vario.4, lwd = 2)

pict

Figure 5: Directional variograms