MyNixOS website logo
Description

Generalized Path Analysis for Social Networks.

The social network literature features numerous methods for assigning value to paths as a function of their ties. 'gretel' systemizes these approaches, casting them as instances of a generalized path value function indexed by a penalty parameter. The package also calculates probabilistic path value and identifies optimal paths in either value framework. Finally, proximity matrices can be generated in these frameworks that capture high-order connections overlooked in primitive adjacency sociomatrices. Novel methods are described in Buch (2019) <https://davidbuch.github.io/analyzing-networks-with-gretel.html>. More traditional methods are also implemented, as described in Yang, Knoke (2001) <doi:10.1016/S0378-8733(01)00043-0>.

gretel: Generalized Path Analysis for Social Networks

Features methods for quantifying path values and identifying optimal paths under a variety of modeling assumptions. Intended to be used in service of other structural analyses.

Getting Started

Installation Instructions

library(devtools)
install_github("davidbuch/gretel")

Example

# Identify the path of optimal conductivity between nodes 1 and 5 of a sociomatrix
# Using example data from *Yang, Knoke* (2001) <DOI: 10.1016/S0378-8733(01)00043-0>

best_path <- opt_gpv(YangKnoke01, source = 1, target = 5, alpha = 1)

# Compare the conductivity of this path to that of an inferior path

gpv(YangKnoke01, path = best_path, alpha = 1)

gpv(YangKnoke01, path = c(1,2,3,4,5), alpha = 1)

Please see the package vignette for more information and examples.

Overview

This package contains two categories of functions. The first category is concerned with assigning values to user specified paths, while the second identifies paths of optimal value.

Key functions in the path value calculation category are

  • gpv, which calculates Generalized Path Value
  • ppv, which calculates Probabilistic Path Value
  • binary_distance, peay_path_value, flament_path_length, peay_average_path_value, and flament_average_path_length, which calculate path value measures described in Yang, Knoke (2001).
  • generate_proximities, which generates a matrix of values representing the measures of optimal paths from each source node (row index) to each target node (column index).

Key functions in the optimal path identification category are

  • opt_gpv, which identifies the path of optimal Generalized Path Value from a particular source node to a particular target node
  • opt_ppv, which identifies the path of optimal Probabilistic Path Value from a particular source node to a particular target node
  • all_opt_gpv, which identifies the 'gpv'-optimal paths from every source node to every target node
  • all_opt_ppv, which identifies the 'ppv'-optimal paths from every source node to every target node
  • unpack, which unpacks the Dijkstra-format encoded shortest paths returned by all_opt_gpv and all_opt_ppv. See their help pages for details.

Author

David A. Buch

Citation

TBA

Acknowledgements

To my Dad, on his birthday.

License

GPL-3

Metadata

Version

0.0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows