Learn R Programming

intensitynet (version 1.3.1)

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

Description

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

Usage

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

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.

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.

Examples

Run this code
if (FALSE) {
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
}

Run the code above in your browser using DataLab