dyadic_wy_cs: Internal function

View source: R/spatial_lag.R

dyadic_wy_csR Documentation

Internal function

Description

Internal function

Usage

dyadic_wy_cs(
  dat,
  origin = "unit1",
  destination = "unit2",
  y = "y",
  w = "w",
  wy = "wy",
  type = "specific_origin",
  weights = "ik",
  row_normalize = TRUE,
  zero_loop = TRUE
)

Arguments

dat

directed dyadic dataset (data.frame)

origin

name of origin id column (character)

destination

name of destination id column (character)

y

name of outcome to lag (character)

w

name of distance/weights column (character)

wy

name of the output variable (character)

type

of W matrix (character)

  • specific origin: y_ij = f(sum_k!=i w * y_kj)

  • specific destination: y_ij = f(sum_m!=j w * y_im)

  • aggregate origin: y_ij = f(sum_k!=i sum_m w * y_km)

  • aggregate destination: y_ij = f(sum_k sum_m!=j w * y_km)

weights

weight specification: ik, jk, im, jm (character)

row_normalize

should each value of the W matrix be divided by the row-wise sum? (boolean)

zero_loop

should wy be set to 0 when origin == destination (boolean)


vincentarelbundock/btergmHelper documentation built on Aug. 24, 2023, 11:17 a.m.