| From | To |
|---|---|
| s01 | s03 |
| s03 | s07 |
| s04 | s07 |
| s06 | s07 |
| s01 | s08 |
| s06 | s08 |
| s01 | s09 |
| s07 | s09 |
From raw rows to the statistical problem
First, build a defensible object
We will make explicit decisions about actors, ties, missingness, time, and covariates.
Then we will inspect what we built before asking a model to use it.
Then, find the statistical problem
The same actors recur across dyads, so the rows are coupled.
We will see a regression reject a true null about half the time and work out why.
The QMD is the complete walkthrough. These slides mark the route and give us places to stop, argue, and interpret.
Alliance network
Which states could have allied, when did they coexist, and what counts as a commitment?
Legislative network
Is the tie cosponsorship, voting agreement, communication, or service on the same coalition?
The actor roster, tie definition, direction, and time window determine the population and outcome before modeling begins.
For every object, summary, or model today, ask:
“It ran” is not an interpretation. “This network contains directed nominations among eligible classmates, with unreported dyads left missing” is.
netify() implements these decisions. It does not make them for us.
Think of a network in your own research.
If we cannot answer those questions in ordinary language, the software arguments will not rescue us.
Direction
Can \(i \rightarrow j\) differ from \(j \rightarrow i\)?
Weight
Is the tie present, counted, measured, or valued?
Roster
Who exists, including actors with no observed ties?
Missingness
Does no row mean zero, unobserved, or ineligible?
Time
Are repeated rows one tie or separate periods?
These choices define the outcome, the risk set, and the population before we estimate anything.
| From | To |
|---|---|
| s01 | s03 |
| s03 | s07 |
| s04 | s07 |
| s06 | s07 |
| s01 | s08 |
| s06 | s08 |
| s01 | s09 |
| s07 | s09 |
What one row says
s01 -> s03 means student 1 nominated student 3.
It does not tell us whether:
s03 nominated s01s02 was asked and nominated nobodyBefore looking at any code: Is this network directed? Binary or valued? Cross-sectional or longitudinal?
s01 s02 s03 s04 s05
s01 NA 0 1 0 0
s02 0 NA 0 0 0
s03 0 0 NA 0 0
s04 0 0 0 NA 0
s05 0 0 0 0 NA
Read it literally
1 is an observed nomination0 is a non-tie under the current missingness ruleNA on the diagonal means self-ties are not eligibleThe matrix is not just storage. It is the set of outcomes the model will treat as possible.
| Matrix entry | Claim being made | Example |
|---|---|---|
1 |
We observed a tie | Student 1 nominated student 3 |
0 |
We observed or assume an eligible non-tie | Student 1 could nominate student 4 but did not |
NA |
We do not have an eligible observed outcome | Self-tie, non-overlap, or unobserved dyad |
| No actor row | The actor is outside the constructed roster | An isolate disappeared because it never entered the edge list |
If an isolated student disappears, what happens to density? What population does the network now describe?
missing_to_zero, the diagonal rule, and the nodelist are modeling decisions in disguise.
Actors
30
The roster size
Directed ties
51
Observed nominations
Density
0.059
Observed ties over eligible ordered pairs
Reciprocity
-0.062
Correlation of \(Y_{ij}\) and \(Y_{ji}\)
In netify, reciprocity is a correlation, not the proportion of observed ties that are mutual. It can be negative.
Two questions about the same actor
Out-degree: Whom did this student nominate?
In-degree: Who nominated this student?
Student s06 made 5 nominations. Student s07 was nominated by 3 classmates.
Day 9 turns the tendency to initiate actions and the tendency to be targeted into separate actor-specific effects. Those are the quantities we technically call sender and receiver effects.
| Source | Target | Date | Event type |
|---|---|---|---|
| Russia | Ukraine | 2014-02-28 | Material conflict |
| Russia | Ukraine | 2014-03-01 | Verbal conflict |
| Russia | Ukraine | 2014-03-03 | Material conflict |
| Germany | Ukraine | 2014-03-04 | Verbal cooperation |
Are the first three rows three ties, one valued tie, or three observations of a process unfolding through time?
There is no automatic answer. The correct representation depends on the substantive question.
Pool the events
One weighted network
Question: How much interaction occurred over the whole period?
Would averaging repeated events preserve the quantity you care about, or quietly change it?
Roster varies by period
Each network contains only actors observed in that period.
Apparent change can reflect actors entering and leaving the matrix.
Roster is held comparable
actor_time_uniform or an explicit nodelist defines who is at risk in each period.
Change is easier to interpret, but the rule must match the design.
If a country has no recorded events in 2015, is it an isolate, unobserved, or outside the risk set?
The safe rule
Join attributes using an actor key.
Never assume the row order of the node table matches the order of the adjacency matrix.
After the join, inspect actor names, missing values, and at least a few known cases.
What happens to a regression if GDP values are shifted down by one country but the dimensions still match?
netify object
Outcome, roster, time, covariates
\(\Longrightarrow\)
to_lame()
Y, Xrow, Xcol, Xdyad
or
to_igraph()
Graph algorithms and plotting
Exporting is not the end of data preparation. It is the point at which our measurement choices become model inputs.
With 30 actors
870 directed dyad rows
58 rows contain any one actor
An actor-level variable is copied across a row or column band. Unobserved actor traits affect those same bands.
Actor attribute
\[x_{ij}=z_i\]
GDP, regime type, gender, or an ideal point
The value repeats across every dyad sent by actor \(i\).
Dyad-specific predictor
\[x_{ij}=w_{ij}\]
Distance, shared border, or a pair-specific treatment
The value can differ from one dyad to the next.
Is the apparent sample size the number of dyads, or is the important variation carried by the actors?
Actor traits
\(a_i, a_j \sim N(0,1)\)
Unobserved sender and receiver propensities
\(\Longrightarrow\)
Outcome
\(y_{ij}=a_i+a_j+\varepsilon_{ij}\)
Dyads sharing actors have related outcomes
\(\perp\)
Predictor
\(x_{ij}=z_i\)
\(z_i\) has no causal or associational effect on \(y_{ij}\)
The coefficient is truly zero. Any rejection is a false positive.
Before we run it, which standard error is going to be too small, and why?
What changed?
Not the true coefficient. It remains zero.
Not the number of rows. Each regression sees the same dyad table.
What changed is where the predictor varies and whether the uncertainty calculation respects that structure.
What it recognizes
Rows sent by the same actor may have correlated errors.
That is enough to repair much of this deliberately sender-driven simulation.
What it leaves out
Dyads can share receivers, reverse direction, time periods, and higher-order network structure.
One-way sender clustering is not a general dyadic correction.
The lesson is not “always cluster by sender.” The lesson is to identify the dependence your design and model actually create.
Shared actor effects
Days 9 and 10
SRM, blocks, distance, and AME
Graph structure
Day 11
ERGM and TERGM
Network change
Day 12
SAOM
Inference and design
Day 13
DCR and causal inference
Compare the answers
Day 14
One network through every lens
These methods are not interchangeable repairs. They encode different questions about actors, ties, structure, time, and uncertainty.
Nuisance
Use latent structure to absorb residual dependence so observed covariate effects and predictions are more credible.
What it owes us: an exogeneity argument if latent effects may correlate with observed covariates.
Estimand
Treat recovered positions, roles, affinities, or influence relations as the substantive quantity to be measured.
What it owes us: identification, alignment, uncertainty, and careful interpretation of omitted structure.
Three cautions: latent maps are invariant to rotation and reflection; one graph is one dependent realization; and latent structure can absorb omitted variables.
“The annual conflict network is sparse, and a small number of states initiated a large share of the recorded conflict. That pattern motivates separate model terms for how often each state initiates conflict and how often each state is targeted.”
Centrality, reciprocity, and clustering describe the network you constructed. They do not establish power, retaliation, or another mechanism by themselves.
A dyadic dataset can contain thousands of rows while carrying only a few dozen independent actor-level values.