In recent decades, methods and concepts from social network analysis have been incorporated into diverse academic disciplines, ranging from sociology to ecology to political science and physics [1, 2]. Although social network analysis is often associated with survey research, observational and archival data present opportunities to study dyadic behavior, arguably without the biases that characterize survey research with informants [3, 4, 5, 6, 7, 8]. In many settings, particularly studies of animal behavior, observational research may represent the only viable option for obtaining data on social relationships. Often, the datasets from these studies are characterized by observations of events over a period of time. For instance, ecologists may document whether individual i helped individual j during an observation.
For ecologists, there is often substantive interest in the extent of dyadic reciprocity between individuals in a population. This interest relates in part to theoretical models of cooperation, where contingent reciprocity represents one possible path toward helping behavior among individuals . By extension, researchers have considered the extent to which dyadic reciprocity may vary as a function of another variable. For instance, individuals who share a kinship tie may exhibit greater reciprocity than unrelated individuals .
The statistical analysis of relational data poses well-known challenges, however, and multiple statistical approaches have been advanced to address the structural dependencies that typify these data . One approach is the multilevel Social Relations Model (SRM), which employs random effects to partition data into separate giving, receiving, and relational components [12, 13]. Originally developed for continuous responses, the SRM can be adapted for discrete responses, such as binary and count outcomes [14, 15, 16].
Conventional applications of the SRM, however, assume that dyadic reciprocity is constant across all dyads in the sample. In other words, the conventional SRM cannot be used to assess the extent to which dyadic reciprocity varies as a function of a covariate. Here I advance an extension of the multilevel SRM that incorporates varying slopes to permit such analyses. The model assumes that dyads have been observed multiple times and that the outcome variable is a binomial proportion.
2 The Statistical Model
Imagine an outcome variable, , in which the response reflects a binomial proportion where the numerator is the number of times that node i directed a behavior toward node j
and the denominator represents the total number of opportunities for the behavior to have been directed. Further imagine a predictor variable,, that represents a dyadic characteristic, such as the degree of relatedness between individuals and .
A binomial regression model can then be specified:
where represents the intercept, is a node-level random intercept for the sending node , is an analogous random intercept for incoming events to , is a conventional fixed effect parameter for the predictor, and are the respective random intercept and slope for dyad , and
is a parameter that captures possible overdispersion beyond the conditional expectation for the binomial distribution.
The random effects for sending and recipient nodes are assumed bivariate normally distributed with zero means and homogeneous covariance matrix
As in other applications of the SRM , the correlation between the respective effects is known as the "generalized reciprocity correlation."
The random effects for the dyad-level intercepts and slopes are likewise assumed bivariate normally distributed with zero means and homogeneous covariance matrix
Importantly, the notation of is an indicator for a symmetric dyadic relationship. That is, within each dyad, the relationship from to and the relationship from to share the same index .
The inclusion of the parameter for additive overdispersion follows Browne et al. . As in standard applications of multilevel modeling, these effects are assumed to be normally distributed:
There may be binomial data that exhibit minimal overdispersion, in which case this parameter could potentially be omitted.
3 Estimating Dyadic Reciprocity
As noted, this approach estimates symmetric dyad effects. When this approach is used in a conventional SRM for continuous data, Snijders and Kenny  show that dyadic reciprocity, , can be estimated as:
where is the variance of the symmetric dyad effects and is the residual variance (implicitly corresponding to the directed dyadic observations, which are the unit of analysis). This parameterization constrains dyadic reciprocity to be positively correlated, which may be a reasonable assumption in many cases.
The same logic can be used to estimate dyadic reciprocity in a binomial SRM. However, these models lack the constant residual variance of Gaussian regression models. As an alternative, latent parameterizations of binomial models may assume that the corresponding variance is , or 3.29 . This quantity can be substituted into the denominator along with the variance for overdispersion effects.
Unlike a conventional SRM with symmetric dyadic effects, the dyadic variance in the above model is not constant. Rather, it varies as a function of the predictor variable, . Snijders  notes that in multilevel models with random slopes, the variance follows a quadratic function of the predictor:
This expression can take the place of the dyadic variance, yielding a corresponding calculation for dyadic reciprocity:
Once the parameters from the statistical model have been estimated, the dyadic reciprocity correlation can be calculated for different values of .
This paper introduces a binomial Social Relations Model that permits the estimation of dyadic reciprocity as a function of a predictor variable. This is accomplished via the parameterization of random effects that correspond to a varying intercept and a varying slope in conventional applications of multilevel modeling . The dyadic variance can then vary as a function of the predictor variable and compared against the residual variance to calculate reciprocity. The present model could be expanded further with the inclusion of other covariates and parameters.
The model here assumes that the outcome is composed of binomial proportions. Such data may be common among researchers who use observational or archival data. In principle, the data could be disaggregated so that the response represent a single binary observation, in which case a comparable random effects structure above could be adapted while permitting analogous estimates of dyadic reciprocity .
The use of the SRM often assumes a "round robin" design in which the dyadic relationships among the individuals or nodes are fully observed. In observational studies, however, individuals may not be simultaneously present. In experimental studies, occasionally a subset of dyadic interactions are precluded by the research design [24, 25]. As with broader applications of the Social Relations Model to "block" designs , the above parameterization could likewise be employed by omitting such unobserved dyads from the analysis.
Whereas the SRM partitions variance according to givers, receivers, and relational components, a number of researchers have observed that social networks often exhibit additional structural dependencies, such as transitivity and block structures [27, 28, 29]. In this literature, dyadic reciprocity are often a secondary consideration relative to other aspects of network structure (cf. ).111Other modeling approaches emphasize the temporal dynamics in longitudinal dyadic data, with relatively greater attention to reciprocity [31, 32]. It may be possible for these statistical approaches to network data to be modified to examine dyadic reciprocity in greater detail alongside other aspects of the data-generating process.
An advantage of the modeling approach above is that it builds on principles that are common in the multilevel modeling literature, namely random intercepts and slopes and the corresponding variance function. One consequence of this approach is that the model is highly parameterized, as two parameters are estimated for each dyad. Another consideration is that the dyadic reciprocity correlation is constrained to be positive. As an alternative, Koster et al.  suggested estimating the reciprocity correlation via a tanh link function that allows the dyadic variance and covariance to be modeled as a function of predictors . In some cases, that latter approach could be more advantageously implemented in a Social Relations Model than the present alternative, particularly in contexts where negative reciprocity correlations might be expected.
-  Stephen P Borgatti, Ajay Mehra, Daniel J Brass, and Giuseppe Labianca. Network analysis in the social sciences. Science, 323(5916):892–895, 2009.
-  Andrew Sih, Sean F Hanser, and Katherine A McHugh. Social network theory: new insights and issues for behavioral ecologists. Behavioral Ecology and Sociobiology, 63(7):975–988, 2009.
-  H Russell Bernard, Peter Killworth, David Kronenfeld, and Lee Sailer. The problem of informant accuracy: The validity of retrospective data. Annual Review of Anthropology, 13(1):495–517, 1984.
-  Deborah A Kashy and David A Kenny. Do you know whom you were with a week ago friday? A re-analysis of the Bernard, Killworth, and Sailer studies. Social Psychology Quarterly, pages 55–61, 1990.
-  Kevin Lewis, Jason Kaufman, Marco Gonzalez, Andreas Wimmer, and Nicholas Christakis. Tastes, ties, and time: A new social network dataset using facebook.com. Social networks, 30(4):330–342, 2008.
-  Eric Quintane and Adam M Kleinbaum. Matter over mind? E-mail data and the measurement of social networks. Connections, 13(1):22–46, 2011.
-  Brandy L Aven. The paradox of corrupt networks: An analysis of organizational crime at Enron. Organization Science, 26(4):980–996, 2015.
-  Brandy Aven, Lily Morse, and Alessandro Iorio. The valley of trust: The effect of relational strength on monitoring quality. Organizational Behavior and Human Decision Processes, 2019.
-  Dorothy L Cheney, Liza R Moscovice, Marlies Heesen, Roger Mundry, and Robert M Seyfarth. Contingent cooperation between wild female baboons. Proceedings of the National Academy of Sciences, 107(21):9562–9566, 2010.
-  Wesley Allen-Arave, Michael Gurven, and Kim Hill. Reciprocal altruism, rather than kin selection, maintains nepotistic food transfers on an Ache reservation. Evolution and Human Behavior, 29(5):305–318, 2008.
-  Tom AB Snijders. Statistical models for social networks. Annual Review of Sociology, 37, 2011.
-  Tom AB Snijders and David A Kenny. The social relations model for family data: A multilevel approach. Personal Relationships, 6(4):471–486, 1999.
-  Jeremy Koster, George Leckie, and Brandy Aven. Statistical methods and software for the Multilevel Social Relations Model. Field Methods, page 1525822X19889011, 2019.
-  Jeremy Koster and Brandy Aven. The effects of individual status and group performance on network ties among teammates in the National Basketball Association. PloS one, 13(4), 2018.
-  Jeremy M Koster and George Leckie. Food sharing networks in lowland Nicaragua: an application of the social relations model to count data. Social Networks, 38:100–110, 2014.
-  Justine Loncke, William L Cook, Jenae M Neiderhiser, and Tom Loeys. The Social Relations Model for Count Data. Methodology, 2019.
-  Jeremy Koster. Family ties: the multilevel effects of households and kinship on the networks of individuals. Royal Society Open Science, 5(4):172159, 2018.
-  Terrence D Jorgensen, K Jean Forney, Jeffrey A Hall, and Steven M Giles. Using modern methods for missing data analysis with the social relations model: A bridge to social network analysis. Social Networks, 54:26–40, 2018.
-  Jeremy Koster, George Leckie, Andrew Miller, and Raymond Hames. Multilevel modeling analysis of dyadic network data with an application to Ye’kwana food sharing. American Journal of Physical Anthropology, 157(3):507–512, 2015.
-  William J Browne, Swamy V Subramanian, Kelvyn Jones, and Harvey Goldstein. Variance partitioning in multilevel logistic models that exhibit overdispersion. Journal of the Royal Statistical Society: Series A (Statistics in Society), 168(3):599–613, 2005.
-  Tom AB Snijders and Roel J Bosker. Multilevel analysis: An introduction to basic and advanced multilevel modeling. Sage, 2011.
-  Harvey Goldstein. Multilevel statistical models, volume 922. John Wiley & Sons, 2011.
-  Richard McElreath. Statistical rethinking: A Bayesian course with examples in R and Stan. CRC press, 2020.
-  Eli J Finkel and Paul W Eastwick. Speed-dating. Current Directions in Psychological Science, 17(3):193–197, 2008.
-  Linda Argote, Brandy L Aven, and Jonathan Kush. The effects of communication networks and turnover on transactive memory and group performance. Organization Science, 29(2):191–206, 2018.
-  Mitja D Back and David A Kenny. The social relations model: How to understand dyadic processes. Social and Personality Psychology Compass, 4(10):855–870, 2010.
-  Pavel N Krivitsky, Mark S Handcock, Adrian E Raftery, and Peter D Hoff. Representing degree distributions, clustering, and homophily in social networks with latent cluster random effects models. Social Networks, 31(3):204–213, 2009.
-  Tracy M Sweet and Qiwen Zheng. Estimating the effects of network covariates on subgroup insularity with a hierarchical mixed membership stochastic blockmodel. Social Networks, 52:100–114, 2018.
-  Shahryar Minhas, Peter D Hoff, and Michael D Ward. Inferential approaches for network analysis: AMEN for latent factor models. Political Analysis, 27(2):208–222, 2019.
-  Bonne JH Zijlstra. Regression of directed graphs on independent effects for density and reciprocity. The Journal of Mathematical Sociology, 41(4):185–192, 2017.
-  Carter T Butts. A relational event framework for social action. Sociological Methodology, 38(1):155–200, 2008.
-  Christoph Stadtfeld and Per Block. Interactions, actors, and time: Dynamic network actor models for relational events. Sociological Science, 4:318–352, 2017.
-  George Leckie, Robert French, Chris Charlton, and William Browne. Modeling heterogeneous variance–covariance components in two-level models. Journal of Educational and Behavioral Statistics, 39(5):307–332, 2014.