Overview
srm is an R package for decomposing network data using the Social Relations Model (SRM). It partitions variation in directed networks into three components: actor effects (sender tendencies), partner effects (receiver tendencies), and unique dyadic effects (relationship-specific deviations). It also estimates covariance structures that capture reciprocity and the correlation between sending and receiving behavior.
Part of the netify ecosystem for network analysis in R.
Quick Start
Social Relations Model
----------------------------------------
Mode: unipartite
Actors: 12
Grand mean: 3.5077
Variance Decomposition:
Actor 1.4000 ( 42.3%)
Partner 0.8539 ( 25.8%)
Unique 1.0546 ( 31.9%)
Relationship 0.6885 (cov)
Actor-Partner -0.2525 (cov)
Actor effects explain 42% of the variation — individual sending tendencies (generosity vs. selectivity) are the dominant source of variation. The positive relationship covariance indicates reciprocity; the negative actor-partner covariance means generous raters are not necessarily rated highly in return.
Test significance
pt = permute_srm(fit, n_perms = 500, seed = 6886)
print(pt)
plot(pt)Longitudinal analysis
data(trade_net)
fit_long = srm(trade_net)
# Stability of positions over time
srm_stability(fit_long, type = "actor")
# Track specific countries
srm_trend_plot(fit_long, type = "actor", n = 4)Key Functions
| Task | Function | Description |
|---|---|---|
| Fit SRM | srm() |
Decompose a network into actor, partner, and unique effects |
| Extract effects | srm_effects() |
Get actor, partner, or unique effect matrices |
| Variance components | srm_stats() |
Compute specific variance/covariance statistics |
| Visualize | plot() |
Actor/partner bar plots, dyadic heatmaps, variance partitions |
| Permutation test | permute_srm() |
Test significance of variance components |
| Longitudinal trends | srm_trends() |
Extract effects as tidy data across time points |
| Trend plots | srm_trend_plot() |
Visualize effect trajectories over time |
| Stability | srm_stability() |
Inter-temporal correlations of effects |
| Simulate | sim_srm() |
Generate synthetic networks from known SRM parameters |
Vignettes
- Getting Started — Component-by-component walkthrough
- The netify-srm Pipeline — End-to-end analysis from raw data to inference
- Bipartite Networks — Two-mode SRM analysis
- Methodology — Mathematical framework and estimation details
Getting Help
- Browse vignettes:
browseVignettes("srm") - Function documentation:
?srm,?permute_srm,?sim_srm - Report bugs: GitHub Issues
References
Dorff, Cassy, and Michael D. Ward. (2013). Networks, Dyads, and the Social Relations Model. Political Science Research Methods 1(2):159-178.
Dorff, Cassy, and Shahryar Minhas. (2017). When Do States Say Uncle? Network Dependence and Sanction Compliance. International Interactions 43(4):563-588.
