Description Usage Arguments Details Value Author(s) References See Also Examples
The function mvariocloudmap()
draws a scatterplot of pairwise Mahalanobis
distances and spatial distances with a map. It is a multivariate version of the
variocloud. The number of couples of sites plotted can be reduced by considering
couples above a quantile regression curve.
1 2 3 4 |
sp.obj |
object of class extending Spatial-class |
nb.obj |
object of class nb |
names.var |
a vector of character; attribute names or column numbers in attribute table |
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 |
color of the points 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 |
The pairwise Mahalanobis distances are calculated using the Minimum Covariance Determinant (MCD)
estimator associated with 75% of observations (function covMcd
in the robustbase
package). Users have the possibility to select some couples of sites on the scatterplot that are also highlightened
on the map. Selection of observations on the map is also possible and leads to the selection of all the
couples which contain the selected observations on the scatterplot.
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.
Fizmoser P., Thomas-Agnan C., Ruiz-Gazen A., Laurent T.
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## data meuse
data(meuse)
# transformation of explanatory variables
meuse[,3:7]<-log(1+meuse[,3:7])
# creation of a Spatial Points object
meuse.sp<-SpatialPoints(cbind(meuse$x,meuse$y))
# creation of a SpatialPointsDataFrame
meuse.spdf<-SpatialPointsDataFrame(meuse.sp,meuse)
# for the spatial contours
data(meuse.riv)
# Spatial Weight matrix based on the 7th nearest neighbours
meuse.knn <- knearneigh(meuse.sp, k=7)
meuse.nb <- knn2nb(meuse.knn)
# example of use of mvariocloudmap. The statistic are calculated by taking
# into account variables cadmium,copper,lead,zinc,elev
mvariocloudmap(meuse.spdf,meuse.nb,c("cadmium","copper","lead","zinc","elev"),
quantiles=0.95, carte=meuse.riv[-c(1:20,73:98,156:176),],identify=TRUE,
criteria=(meuse.spdf$lime==1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.