monadic_w: Create a W matrix. With panel data, this will produce a block...

View source: R/spatial_lag.R

monadic_wR Documentation

Create a W matrix. With panel data, this will produce a block diagonal matrix.

Description

Create a W matrix. With panel data, this will produce a block diagonal matrix.

Usage

monadic_w(
  dat,
  origin = "unit1",
  destination = "unit2",
  w = "w",
  time = NULL,
  row_normalize = TRUE
)

Arguments

dat

directed dyadic dataset (data.frame)

origin

name of origin id column (character)

destination

name of destination id column (character)

w

name of distance/weights column (character)

time

name of the (optional) time variable column (character)

row_normalize

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


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