NodeGeneralCorrelation: Calculate dependence statistics on the network

View source: R/intensitynet.R

NodeGeneralCorrelationR Documentation

Calculate dependence statistics on the network

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
)

## S3 method for class 'intensitynet'
NodeGeneralCorrelation(
  obj,
  dep_type = c("correlation", "covariance", "moran", "geary"),
  lag_max,
  intensity,
  partial_neighborhood = TRUE
)

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

Value

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

Examples


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)


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