spcorrelogram.bi {bispdep}  R Documentation 
Bivariate spatial correlogram
Description
Bivariate spatial correlograms for Moran's Ixy and the autocorrelation coefficient, with print and plot helper functions.
Usage
spcorrelogram.bi(neighbours, varX, varY, order = 1, method = "corr",
style = "W", randomisation = TRUE, zero.policy = NULL,
spChk=NULL, alternative = "greater", drop.EI2=FALSE)
## S3 method for class 'spcorbi'
plot(x, main, ylab, ylim, ...)
## S3 method for class 'spcorbi'
print(x, p.adj.method="none", ...)
Arguments
neighbours 
an object of class 
varX 
a numeric vector of the variable 
varY 
a numeric vector of the variable 
order 
maximum lag order 
method 
"corr" for correlation, "I" for Moran's Ixy, "C" for Geary's Cxy 
style 

randomisation 
variance of I or C calculated under the assumption of randomisation, if FALSE normality 
zero.policy 
default NULL, use global option value; if FALSE stop with error for any empty neighbour sets, if TRUE permit the weights list to be formed with zerolength weights vectors 
spChk 
should the data vector names be checked against the spatial objects for identity integrity, TRUE, or FALSE, default NULL to use 
alternative 
a character string specifying the alternative hypothesis, must be one of greater (default), less or two.sided. 
drop.EI2 
default FALSE, if TRUE, emulate CrimeStat <= 4.02 
x 
an object from 
p.adj.method 
correction method as in 
main 
an overall title for the plot 
ylab 
a title for the y axis 
ylim 
the y limits of the plot 
... 
further arguments passed through 
Details
The print function also calculates the standard deviates of Bivariate Moran's Ixy or Geary's Cxy and a twosided probability value, optionally using p.adjust
to correct by the nymber of lags. The plot function plots a bar from the estimated value of Bivariate Moran's Ixy, or Geary's Cxy to +/ twice the square root of its variance (in previous releases only once, not twice). The table includes the count of included observations in brackets after the lag order. Care must be taken when interpreting the results, since increasing the order of the lag tends to include fewer observations.
Value
returns a list of class spcorbi
:
res 
for "corr" a vector of values; for "I", a matrix of estimates of "I", expectations, and variances 
method 
"I" or "corr" 
cardnos 
list of tables of neighbour cardinalities for the lag orders used 
var 
variable name 
References
Czaplewski, R.L., Reich, R.M. 1993. Expected value and variance of Moran's bivariate spatial autocorrelation statistic for a permutation test, Research paper RM309, Fort Collins, CO U.S. Department of Agriculture, Forest Service, Rocky Mountain Forest and Range Experiment Station, p, 13.
See Also
Examples
library(spdep)
data(columbus)
data(oldcol)
columbus < st_read(system.file("shapes/columbus.shp", package="spData")[1], quiet=TRUE)
plot(st_geometry(columbus))
col_nbq < poly2nb(columbus)
Cspcb < spcorrelogram.bi(col_nbq,columbus$CRIME,columbus$INC,order=7,
method="corr",zero.policy=TRUE,alternative="two.sided")
print(Cspcb)
plot(Cspcb)
Ispcb < spcorrelogram.bi(col_nbq,columbus$CRIME,columbus$INC,order=7,
method="I",zero.policy=TRUE,alternative="two.sided")
print(Ispcb)
plot(Ispcb)
Cspcb < spcorrelogram.bi(col_nbq,columbus$CRIME,columbus$INC,order=7,
method="C",zero.policy=TRUE,alternative="two.sided")
print(Ispcb)
plot(Ispcb)