NodeLocalCorrelation: Calculates local correlations based on nodes

View source: R/intensitynet.R

NodeLocalCorrelationR Documentation

Calculates local correlations based on nodes

Description

Gives the node local Moran-I, Getis-Gstar or Geary-c correlations

Usage

NodeLocalCorrelation(obj, dep_type = "moran", intensity)

## S3 method for class 'intensitynet'
NodeLocalCorrelation(obj, dep_type = c("moran", "getis", "geary"), intensity)

Arguments

obj

intensitynet object

dep_type

'moran', 'getis' or 'geary'. Type of local correlation to be computed (Moran-i, Getis-Gstar, Geary-c), default = 'moran'.

intensity

vector containing the values to calculate the specified correlation for each node in the network.

Value

a vector containing two values. The first value is a vector with the specified local correlations for each node. The second values is the given intensitynet class object but with the correlations added to the node attributes of its network.

Source

*"A Local Indicator of Multivariate SpatialAssociation: Extending Geary's c, Geographical Analysis" Luc Anselin (2018) <doi:10.1111/gean.12164>

Examples

## Not run: 
data("und_intnet_chicago")
g <- und_intnet_chicago$graph
data_moran <- NodeLocalCorrelation(und_intnet_chicago, 
                                   dep_type = 'moran', 
                                   intensity = igraph::vertex_attr(g)$intensity)
moran_i <- data_moran$correlation
intnet <- data_moran$intnet

## End(Not run)

intensitynet documentation built on April 11, 2023, 6:07 p.m.