for social science
A network is mathematically defined as a graph \(G = (V, E)\):
Notation
In directed graphs, an edge \(e = (u, v)\) points from source \(u\) to target \(v\) (often termed a directed arc).
A graph \(G\) with \(N\) vertices is represented by an \(N \times N\) adjacency matrix \(A\):
\[ A_{ij} = \begin{cases} 1 & \text{if } (i, j) \in E \\ 0 & \text{otherwise} \end{cases} \]
| Network Type | Nodes (\(V\)) | Edges (\(E\)) |
|---|---|---|
| Correlation Graph | Psychological traits / Symptoms | Correlation coefficient |
| Partial Correlation / GGM | Variables / Dimensions | Conditional correlation |
| Structural Equation Model | Latent / Observed factors | Covariance / Directed paths |
| Causal DAG | Interventions / Variables | Directed causal mechanisms |
| Social Network | Individuals / Organizations | Friendship, communication, ties |
| Spatial Network | Cities, intersections, landmarks | Roads, transit, distance |
Intuition: Quantifies how well-connected a node is by counting its direct connections.
Undirected Graph: \[ \small k_i = \sum_{j=1}^{N} A_{ij} \]
Directed Graph: \[ \small k_i^{\text{in}} = \sum_{j=1}^{N} A_{ji} \quad \text{(Inward endorsements / popularity)} \] \[ \small k_i^{\text{out}} = \sum_{j=1}^{N} A_{ij} \quad \text{(Outward activity / gregariousness)} \]
\[ C_B(i) = \sum_{s \neq i \neq t \in V} \frac{\sigma_{st}(i)}{\sigma_{st}} \]
The clustering coefficient \(C_i\) of node \(i\) measures the proportion of realized ties among its \(k_i\) neighbors:
\[ C_i = \frac{2 L_i}{k_i(k_i - 1)} \]
“Birds of a feather flock together”
Caveat Wasserman (2013)
RCT remains the gold standard. Any algorithmic causal discovery is an approximation reliant on structural and distributional assumptions.
| Network | Node | Edge Meaning |
|---|---|---|
| Marginal Correlation Graph | Variables / Factors | Marginal correlation |
| Partial Correlation Graph | Variables / Factors | Conditional correlation |
| Conditional Independence Graph | Variables / Factors | Conditional independence |
| Causal Graph | Variables / Factors | Directed causation |
Let variables be jointly Gaussian: \(X \sim \mathcal{N}(\mu, \Sigma)\).
Theorem
Suppose \(X \sim \mathcal{N}(\mu, \Sigma)\). Then: \[X_i \perp \!\!\! \perp X_j \mid X_{-(i,j)} \iff \Omega_{ij} = 0\]
Researchers frequently need interval estimation and hypothesis testing rather than purely point estimates:
Computing empirical partial correlations directly encounters barriers:
:::
bootnetlibrary(psychTools)
library(bootnet)
library(qgraph)
# Load sample data: Big Five Inventory (BFI)
data(bfi)
bfiSub <- bfi[, 1:25]
# 1. Marginal correlation network
Network_corr <- estimateNetwork(bfiSub, default = "cor")
# 2. Gaussian Graphical Model with EBICglasso
Network_BIC <- estimateNetwork(bfiSub, default = "EBICglasso")
# 3. Ising model for binary variables
Network_Ising <- estimateNetwork(bfiSub, default = "IsingFit")
# 4. Mixed Graphical Model (MGM) for mixed data types
Network_Mgm <- estimateNetwork(bfiSub, default = "MGM")# Plot network layout using the Fruchterman-Reingold algorithm
plot(Network_BIC, layout = "spring")
# Compute and plot centrality indices (Strength, Betweenness, Closeness)
centralityPlot(Network_BIC)
# Test for statistical difference in edge strength
differenceTest(Network_BIC, "A1", "C2", "strength")IsingFit.mgm).Let \(Y\) be an \(N \times N\) adjacency matrix of binary random variables \(Y_{ij} \in \{0, 1\}\).
The general probability distribution of observing graph \(y\) is:
\[ P(Y = y \mid \theta) = \frac{\exp\left(\theta^\top g(y)\right)}{\kappa(\theta)} \]
Conditioning on the rest of the network (\(Y_{-ij}\)), the log-odds of a tie between \(i\) and \(j\) takes a logistic form:
\[ \text{logit}\left(P(Y_{ij} = 1 \mid Y_{-ij}, \theta)\right) = \theta^\top \delta(y)_{ij} \]
where \(\delta(y)_{ij}\) is the change statistic:
\[ \delta(y)_{ij} = g\left(y_{ij}^{+}\right) - g\left(y_{ij}^{-}\right) \]
statnet) Handcock et al. (2008)## ==========================
## Monte Carlo MLE Results:
## Estimate Std. Error MCMC % p-value
## edges -0.7621 0.2047 0 0.000313 ***
## ---
## Residual Deviance: 137.6 on 109 degrees of freedom
## AIC: 139.6 BIC: 142.3
Hypothesis: Are older children imitated more frequently (higher in-degree)?
## Estimate Std. Error MCMC % p-value
## edges -2.89853 0.96939 0 0.00345 **
## nodeicov.age.month 0.05225 0.02272 0 0.02340 *
Triangles quantify transitivity and local clustering:
## Estimate Std. Error MCMC % p-value
## edges -0.55772 0.58201 0 0.340
## triangle -0.05674 0.15330 0 0.712
triangle):
Caution on Naive Triangle Terms
Models with raw triangle counts frequently suffer from MCMC degeneracy: - The simulated chain collapses into either a completely empty graph or a complete clique. - Standard errors blow up, or MCMLE fails to converge.
gwesp (Geometrically Weighted Edgewise Shared Partner)gwdgree / gwidegree / gwodegreeWe evaluate whether the fitted model reproduces higher-order network metrics not explicitly parameterized: Hunter, Goodreau, and Handcock (2008)
mcmc.diagnostics).gwesp).gof().