The function `variocloudmap()`

draws a semi-variocloud (directional or omnidirectional) and a map.
It is used to detect spatial autocorrelation. Possibility to draw the empirical semi-variogram
and a robust empirical semi-variogram.

1 2 3 4 |

`sp.obj` |
object of class extending Spatial-class |

`name.var` |
a character; attribute name or column number in attribute table |

`bin` |
a vector of numeric values where empirical variogram will be evaluated |

`quantiles` |
a boolean to represent the Additive Quantile Regression Smoothing |

`names.attr` |
names to use in panel (if different from the names of variable used in sp.obj) |

`criteria` |
a vector of boolean of size the number of Spatial Units, which permit to represent preselected sites with a cross, using the tcltk window |

`carte` |
matrix with 2 columns for drawing spatial polygonal contours : x and y coordinates of the vertices of the polygon |

`identify` |
if not FALSE, identify plotted objects (currently only working for points plots). Labels for identification are the row.names of the attribute table row.names(as.data.frame(sp.obj)). |

`cex.lab` |
character size of label |

`pch` |
16 by default, symbol for selected points |

`col` |
"lightblue3" by default, color of bars on the cloud map |

`xlab` |
a title for the graphic x-axis |

`ylab` |
a title for the graphic y-axis |

`axes` |
a boolean with TRUE for drawing axes on the map |

`lablong` |
name of the x-axis that will be printed on the map |

`lablat` |
name of the y-axis that will be printed on the map |

`xlim` |
the x limits of the plot |

`ylim` |
the y limits of the plot |

For some couple of sites *(s_i,s_j)*, the graph represents on the y-axis the semi squared difference
between *var_i* and *var_j* :

*gamma_ij=0.5(var_i-var_j)^2*

and on the x-absis the distance *h_(ij)* between *s_i* and *s_j*.
The semi Empirical variogram has been calculated as :

*gamma(h)=0.5/|N(h)|sum_(N(h))(Z(s_i)-Z(s_j))^2*

where

*N(h)={(s_i,s_j):s_i-s_j=h;i,j=1,...,n}*

and the robust version :

*gamma(h)=frac(1)(2(0.457+frac(0.494)(|N(h)|)))(frac(1)(|N(h)|)sum_(N(h))|Z(s_i)-Z(s_j)|^(1/2))^4*

The number N of points to evaluate the empirical variogram and the distance *epsilon* between
points are set as follows :

*N=frac(1)(max(30/n^2,0.08,d/D))*

and :

*epsilon=frac(D)(N)*

with :

*D=max(h_ij)-min(h_ij)*

and :

*d=max(h_ij^(l)-h_ij^(l+1)),*

where *h^(l)* is the vector of sorted distances.
In options, possibility to represent a regression quantile smoothing spline *g_alpha* (in that
case the points below this quantile curve are not drawn).

In the case where user click on `save results`

button,
a matrix of integer is created as a global variable in `last.select`

object.
It corresponds to the numbers of spatial unit corresponding to couple of sites selected
just before leaving the Tk window.

Thomas-Agnan C., Aragon Y., Ruiz-Gazen A., Laurent T., Robidou L.

Thibault Laurent, Anne Ruiz-Gazen, Christine Thomas-Agnan (2012), GeoXp: An R Package for Exploratory Spatial Data Analysis. *Journal of Statistical Software*, 47(2), 1-23.

Cressie N. and Hawkins D. (1980), *Robust estimation of the variogram*, in Journal of the international association for mathematical geology, 13, 115-125.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
#####
# Data Meuse
data(meuse)
# meuse is a data.frame object. We have to create
# a Spatial object, by using first the longitude and latitude
# to create Spatial Points object ...
meuse.sp = SpatialPoints(cbind(meuse$x,meuse$y))
# ... and then by integrating other variables to create SpatialPointsDataFrame
meuse.spdf = SpatialPointsDataFrame(meuse.sp, meuse)
# meuse.riv is used for contour plot
data(meuse.riv)
# example of use of variocloudmap
variocloudmap(meuse.spdf, "zinc", quantiles=TRUE, bin=seq(0,2000,100),
xlim=c(0,2000),ylim=c(0,500000),pch=2,carte=meuse.riv[c(21:65,110:153),],
criteria=(meuse$lime==1))
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.