Learn R Programming

intensitynet (version 1.3.1)

NodeGeneralCorrelation: It allows to compute different dependence statistics on the network for the given vector and for neighborhoods of distinct order. Such statistics are; correlation, covariance, Moran’s I and Geary’s C.

Description

It allows to compute different dependence statistics on the network for the given vector and for neighborhoods of distinct order. Such statistics are; correlation, covariance, Moran’s I and Geary’s C.

Usage

NodeGeneralCorrelation(
  obj,
  dep_type,
  lag_max,
  intensity,
  partial_neighborhood = TRUE
)

Value

A vector containing the dependence statistics (ascending from order 0).

Arguments

obj

intensitynet object

dep_type

'correlation', 'covariance', moran', 'geary'. The type of dependence statistic to be computed.

lag_max

Maximum geodesic lag at which to compute dependence

intensity

Vector containing the values to calculate the specified dependency in the network. Usually the node mean intensities.

partial_neighborhood

use partial neighborhood (TRUE) or cumulative (FALSE). TRUE by default

Examples

Run this code

data("und_intnet_chicago")
g <- und_intnet_chicago$graph
gen_corr <- NodeGeneralCorrelation(und_intnet_chicago, dep_type = 'correlation', lag_max = 2, 
                                   intensity = igraph::vertex_attr(g)$intensity)

Run the code above in your browser using DataLab