dyadic_wy | R Documentation |
Adds a new Wy column which measures specific/aggregate origin/destination contagion (directed dyadic cross-sectional or panel data)
dyadic_wy(
dat,
origin = "unit1",
destination = "unit2",
y = "y",
w = "w",
wy = "wy",
time = NULL,
type = "specific_origin",
weights = "ik",
row_normalize = TRUE,
zero_loop = TRUE,
progress = FALSE
)
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) |
time |
name of the time variable (optional) (character) |
type |
of W matrix (character)
|
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) |
progress |
boolean show progress bar (boolean). Only works with 'plan(multiprocess)' and panel data ('time != NULL'). |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.