NETWORK ANOVA RANDOM EFFECTS MODELS FOR NODE ATTRIBUTES

. This paper develops a subgraph network random eﬀects error components structure for network data to perform analysis of variance. In partic- ular, it proposes a model for evaluating the network interdependence of nodes attributes allowing for edge and triangle speciﬁc components. The latter serve as a basal model for modeling more general network eﬀects. Consistent estimators of the variance components and Lagrange Multiplier speciﬁcation tests for evaluating the appropriate model of random components in networks structures is proposed. Monte Carlo simulations show that the tests have good performance in ﬁnite samples. The proposed tests is applied to the unsecured (Call) interbank market network in Argentina.


1.
Introduction. Network effects, where the interaction among agents is considered relevant, is a topic of interest in the statistical literature. In network structured data, the information on the direct or indirect contact among the involved parties actually matters. This fact has attracted considerable attention, especially regarding possible spillover effects in diverse areas, such as education, production, financial and banking markets, trade and many others. See [12], [13] and [15] for a recent literature reviews. The kind of applications cover both the statistical and game theoretical analysis, see e.g. [14] and [18] for recent works.
In a given network structure, observations are not independent and the relationships among them depend on their relative network position. The network structure differs from the spatial statistical analysis, as the latter is naturally embedded into some metric space (i.e., natural geometry). It is also different from panel data models because there is no prior group structure to cluster observations. The most obvious type of intra-network correlation arises when we consider observations given by vertices or nodes that have a common edge or link. If we consider a link-specific effect, this would result in a specific factor that arises only for those linked nodes and not for others. Nodes that share a link might be more correlated with each other than with others with no links. This simple idea can be extended to any subgraph structure, such as triangles, diamonds, cliques, stars, etc. That is, nodes that are within a common subgraph share more in common that nodes that are not. These common features may be subgraph specific, thus allowing for a given structure of nodes correlation depending whether they belong to the same subgraph or not.
This paper is concerned with statistically evaluating a real valued node attribute within a network structure. In particular, the variance and covariance structure, thus using analysis of variance (ANOVA). We define a random components structure where the components depend on local network features of the observations. In particular, for a given graph we construct the error components model by considering node-, link-and triangle-specific effects. The main purpose of this exercise is that the empirical researcher starts from a standard variance-covariance structure (i.e., independent error components), and then tests sequentially for potential components' patterns (e.g., edges, triangles, diamonds, cliques, stars, etc.). The result is that the observed node attribute can be decomposed into subgraph specific components that adds to the total variability in the attribute. The developed error components model has interesting features. Contrary to the standard error components models, network effects will typically imply heteroskedastiticy. Take for instance the vertex&edge-only error components model where each vertex will have a vertex specific random component and an edge specific random component. Vertices that have one link are different from those that have two or more. The edge specific component will in fact generate a higher variance for vertices with more links. The ANOVA structure might have positive variance at some subgraph network structures but not others. Thus, identifying which random components are active and which are not is an important for correct specification. This paper is organized as follows. Section 2 develops the subgraph network random effects error components model. Section 3 presents simple consistent variancecovariance components estimators. Section 4 constructs specification tests and Section 5 evaluates the finite sample performance using Monte Carlo experiments. Section 6 applies the proposed tests to the interbank market in Argentina. Section 7 concludes.
2. Network error components model.
2.1. Network definition and notation. Consider a graph G = (V, L) as a mathematical structure consisting of a set V of vertices (also commonly called nodes) and a set L of edges (also commonly called links). Unless otherwise specified the graph is undirected where elements of L are unordered pairs (i, s) of distinct vertices (i, s) ∈ V ×V . In a directed graph the elements of L are ordered pairs (i, s) ∈ V ×V . The number of vertices is N = |V | and the number of edges is M = |L|. Without loss of generality, we will label the vertices simply with the integers 1, . . . , N , and the edges, 1, . . . , M . Note that M ≤ N (N − 1)/2 for undirected graphs (and M ≤ N (N − 1) for directed ones). There are 2 ( N 2 ) potential undirected networks. For our purposes consider a set of triangles in undirected graphs as T riangles = {(i, s, r) ∈ V 3 , i < s < r, (i, s), (s, r), (i, r) ∈ L 3 }, the number of triangles is T ≤ N (N − 1)(N − 2)/6. The set of triangles could be defined differently for directed graphs.
The fundamental connectivity of a graph G may be captured in an N × N binary adjacency matrix A with entries and the triangle incidence matrix C, an N × T binary matrix with entries Subgraph random effects in the undirected graph model. Consider the following assumption on the probability space.
• Let G ∈ G N be a space of graphs of size N , σ(G N ) a σ-algebra in the sample space G N , and P N a probability space on the measurable space on G N , σ(G N ). Then [G N , σ(G N ), P N ] form a probability space. This paper is concerned with the additive random network structure of the following form.

Assumption 2.
• Assume that where {b ij } and c ik are the row vectors of matrices B and C derived from graph G, and ν, µ and δ are mutually independent random variables that satisfy: The random variable ε i is the node attribute of interest. This paper evaluates whether this attribute is related to the network structure and quantifies its components, namely a node component, a link component and a triangle component.
The model can also be written as where µ (is) and δ (isr) correspond to the common edge and triangle effects, respectively.
In matrix notation the model above can be written as an N × 1 vector such as and In the case with no network effects, defined as the vertex-only model, Ω v = σ 2 ν I N . In this case, the network structure has no effect on the node attributes and each realization is the result of an iid random variable.
The random-effects vertex&edge incidence model would be Ω ve = σ 2 ν I N +σ 2 µ BB . In this case, the node attributes are affected by the presence of common links. This produces an heteroskedastic effect because common links would be associated with a separate random component. The relative magnitudes of σ 2 ν and σ 2 µ would help in evaluating the importance of links within the network.
The random-effects vertex&triangle incidence model would have Ω vt = σ 2 ν I N + σ 2 δ CC . Joining both models gives a general model with vertex, edge and triangle random components in (4).
The results above can be easily extended to weighted networks where A is replaced by W , and the B and C matrices are also constructed using the weighted components.

2.3.
Comparison with spatial models. Consider now a simple spatially autocorrelated models, where the matrix A is related to distance, and for this case A is a symmetric contiguity matrix. See [3] for a discussion and a comparison of different models.
The simplest statistic for spatial dependence is the so-called Moran's I statistic, defined as m = ε Aε ε ε . While this provides an intuitive way of quantifying spatial dependence it provides not guidance on how to model the random components. Another model of spatial autocorrelation is captured by a simple autocorrelation parameter ρ such that ε = ν + ρAν, ν ∼ iid(0, σ 2 ν ). In this model the node attribute ε is composed of an idiosyncratic component, ν, which may have an effect on the linked nodes through the adjacency matrix A. Note that this produces the following structure in the variance-covariance matrix: . Although this would capture some of the features developed above, it imposes restrictions on the parameters, i.e., ρ and ρ 2 (see, e.g., [16,17]).
The added value of the paper can be seen in comparison to this spatial model. These models require a pre-specification of the adjacency matrix, which may be subject to misspecification. Once this is given there is a fixed relation among the variance-covariance components that multiply the powers of A, i.e., ρ. The potential gains from using a subgraph network error component model rather than a spatial model would depend on the flexibility of adding additional components in ε instead of a correlation structure of a single component ν.
There is also a conceptual difference. Suppose a shock or perturbation in a given node. The spatial model would then evaluate how this shock propagates across the network depending on A, which in turn relates to the pre-specified distance. On the contrary, the proposed subgraph network model would consider that a given shock may be the result of a perturbation in a particular subgraph structure (i.e., node, link, tringle). The propagation may occur only if there are common substructures among nodes. Furthermore, the shock effect may be of different magnitude depending on the type of subgraph effects that will appear.
3. ANOVA consistent variance components estimators. Here we consider simple consistent estimators of the variance components using ANOVA-type decompositions.
Consider the following statistics: N r>s a is a sr a ir u i u s . S 1 contains the usual sum of squared errors.
Note that for each vertex there will be at most N − 1 edges to which it belongs and N − 2 triangles. Moreover, each edge will be repeated twice for undirected graphs, one for each vertex, and each triangle will be repeated three times, one for each vertex. Then, is the (conditional) variance of a vertex. S 2 contains the cross products of the error terms, which corresponds to the number of edges M . This corresponds to the existing active links (i.e., a is = 1, s > i). For each active link, there could be at most N − 2 triangles that can be formed from it. Now, each triangle will be repeated three times for each link. That is, for S 2 if we have an edge, say (i, s), that belongs to a triangle, say (i, s, r), such that r > s > i, then the triangle effect δ (i,s,r) will appear in the edges (i, s), (s, r), and (i, s). Thus, each triangle will be found 3 times for every edge. Thus, is the (conditional) covariance of two vertices that have a common edge.
Finally, S 3 computes the cross products for active triangles (i.e., a is = a sr = a ir = 1, r > s > i). Note that for S 3 if we have a triangle, say (i, s, r), then two nodes, say i and s, must share both µ (i,s) and δ (i,s,r) . Then, is the (conditional) covariance of two vertices that have common edge and triangle(s).
In the absence of triangle effects, i.e., σ 2 δ = 0, the model simplifies to such that the ratio of the variance of a vertex to the covariance of two random vertices needs to be bigger than the average number of edges per vertex. First, take for instance a cycle graph, a 2-regular graph with all vertices of degree 2 such that M = N . For this case the variance of the vertices need to be at least twice the covariance. Second, consider a complete graph with M = N (N − 1)/2. In this case, the ratio of variance to covariance needs to grow faster than the number of vertices.
In the absence of edge effects, σ 2 µ = 0, the model simplifies to such that the ratio of the variance of a vertex to the covariance of two random vertices needs to be bigger than the average number of triangles per vertex.
For the edge and triangle effects model, solving for (σ 2 ν , σ 2 µ , σ 2 δ ) gets σ 2 For this case the non-negativity restrictions imply: Restriction (i) implies that the covariance among vertices that belong to a triangle must be larger than the covariance of vertices that share a link. Restriction (ii) states that the ratio E[S3|G] E[S2|G] cannot exceed the average number of triangles per edge. Restriction (iii) correspond to the number average number of links per vertex. Restriction (iv) is a combination of the above with no clear interpretation. 4. Specification tests for undirected unweighted graphs. We consider Lagrange Multiplier (LM) tests for testing the presence of different network random components structures assuming that the error components are Gaussian. Consistent estimators of θ under the null can be obtained using an ANOVA-type analysis as in Section 3. Hence our tests will be based on Neyman's C(α) principle, which produces tests that are asymptotically equivalent to likelihood based LM tests under √ N -consistent non-maximum likelihood estimation of the nuisance parameters. See [7] for a discussion.
Consider now [10] locally size-robust type statistics (BY test hereafter). For this, consider a new partition of θ = (θ 1 , θ 2 , θ 3 ) = (θ 1 , θ 23 ) where we want to test for the null hypothesis H 2 0 , we consider θ 1 as nuisance parameters to be estimated, but the validity of the test is affected by the validity of H 3 0 : θ 3 = 0. Global valid tests for H 2 0 would require consistent estimators of θ 3 as in the construction of the conditional LM statistics above. In practice, however, estimators of θ 3 may be cumbersome. Moreover, they may suffer identification conditions under the null. Thus, [10] has been successfully implemented to test one particular null without estimating the other nuisance parameter θ 3 . This procedure is valid under √ N -local deviations of H 3 0 and different empirical studies confirmed its validity for non-local deviations. In our particular case, the parameter will be partitioned as θ 1 = σ 2 ν , θ 2 = σ 2 µ , θ 3 = σ 2 δ . This procedure allows us to test for triangle effects without estimating the edge effects variance component, even when we are estimating under the joint null hypothesis H 2 0 &H 3 0 : σ 2 µ = σ 2 δ = 0, which is just least-squares estimation. The statistic is constructed as in [8,9] for non-maximum likelihood estimation. Then, forθ being a consistent estimator under the joint null hypothesis H 2 0 &H 3 0 : σ 2 µ = σ 2 δ = 0 and for θ 3 = o(1/ √ N ). The test considered are: • LM µ : LM test for H 0 : σ 2 µ = 0 when σ 2 ν is estimated as mean squared error (MSE) after OLS estimation and σ 2 δ = 0 is assumed. • LM δ : LM test for H 0 : σ 2 δ = 0 when σ 2 ν is estimated as MSE after OLS estimation and σ 2 µ = 0 is assumed.

Monte Carlo experiments.
Here we explore the small sample performance of the proposed tests through a Monte Carlo experiment. We will consider the following model: where A = {a ir } is an adjacent contiguity matrix. We assume ν i ∼ iid N (0, 10), µ (is) ∼ iid N (0, σ 2 µ ) and δ (isr) ∼ iid N (0, σ 2 δ ). We consider N ∈ {100, 225, 400} and simulate two types of networks. First, we consider an Erdös-Rényi random graph where links are randomly generated with a given probability p N , i.e., P rob(a ir = 1) = p N , i, r = 1, . . . , N, i = r. For the Erdös-Rényi graphs we have on average a constant proportion of vertices and edges, N/M , using p 100 = 0.05, p 225 = 0.05 × 100/225, p 400 = 0.05 × 100/400. In this case, the number of triangles per node is also constant on average. Second, a queen-type spatial structure where edges are generated according to queen contiguity, i.e., for a squared board with number of rows and columns n = √ N , for i = 1, . . . , N , a ir = 1 if r ∈ {i − 1, i + 1, i − n − 1, i − n, i − n + 1, i + n − 1, i + n, i + n + 1} with 1 ≤ r ≤ N , and a ir = 0 otherwise. Note that the considered spatial-type model has a similar number of triangles and edges for each node, i.e., 8 edges and triangles for a node that is not on the border of the board.
First, we consider the empirical size results where we impose the absence of both edge and triangle random effects, σ 2 µ = σ 2 δ = 0 in Table 7. In all cases, marginal, joint and robust tests have the appropriate size, for all levels of significance.
Second, we consider the empirical power and size-robustness for (σ 2 µ , σ 2 δ ) ∈ {0, 1, . . . , 10} 2 in figures 1 and 4. In each case the (a) figure report the rejection rates as we increase the value of σ 2 µ , and the (b) the rejection rates for different values of σ 2 µ . Figures 1 and 2 report the tests for detecting edge heterogeneity, that is, σ 2 µ > 0. Note that the marginal tests LM µ has the largest power performance for changes in σ 2 µ (see top figures (a)), followed by the joint tests LM µδ . However, the marginal test also rejects in the direction of σ 2 δ > 0, as the bottom (b) figures show. Indeed, it is not robust to the presence of triangle effects. In order to detect departures from σ 2 µ = 0 the BY tests are constructed, robust to the presence of σ 2 δ > 0, without estimating σ 2 δ . The BY robust test have good power performance as can be seen in figures 1-(a), in fact, close to the joint test, but it has low power in the Queen spatial more complex network model, as shown in figure 2-(a). Nevertheless, the BY test is robust to deviations in σ 2 δ > 0, as seen in figures 1-(b) and 2-(b).
Tests for triangle effects have a similar performance to those of edge effects. As in the previous paragraph, the tests have the expected rejection rates in the direction of σ 2 δ > 0, and the BY robust test have correct size for σ µ > 0. Note that the conditional test LM δ−µ estimates σ 2 µ , and as such it should be robust to misspecification in edge effects. For this case the BY robust tests outperforms it in terms of size and power in the Erdös-Rényi random graph model, and it is very close to the conditional tests in the Queen spatial structure.
6. Empirical application. Network analysis of the interbank market is a useful tool for policymakers as it can help to prevent financial contagion and problems related to 'too-big-to-fail' financial institutions. In fact, empirical networks have been used for stress test exercises, see [24] for a review. Despite been developed to assess centrality in other contexts, when adapted to the context of financial networks, network centrality measures can guide bank regulation authorities in their assessment of the systemic importance of financial and non-financial institutions. In fact, in the financial economic literature network analysis has mostly been applied to payment systems, interbank markets, and more recently extended to capture the mutual exposure of financial institutions to other asset classes, including derivatives contracts, in a multilayer networks framework [19,4,20,21].
Also, network positioning may affect banks' liquidity management and interest rates by different mechanisms. First, in line with [1], dense interconnections serve as a mechanism for the propagation of shocks, leading to a more fragile financial system. In that sense, banks that are more connected may be perceived by the market as more fragile. However, the same banks can be perceived as 'too-interconnectedto-fail' such that rather than fragile, those banks are perceived as more likely to be bailout, see [5]. This is similar to the too-big-to-fail effect observed in other interbank markets. Second, as argued by [11], financial institutions with more extensive and strategic financial networks, can more efficiently acquire and process information due to their better access to order flows, see [22]. Third, banks with higher centrality within the network have better access to liquidity and are able to charge larger intermediation spreads. Previous empirical evidence [2,6,23] suggests that being systemically more important, in term of size or connectedness, can explain part of the cross-sectional variation in banks' borrowing costs before and during the global financial crisis.
We apply this analysis to the interbank overnight unsecured Call market in Argentina. In this market, banks directly connect each other ("call") to lend or borrow excess reserves and to satisfy Central Bank minimum liquidity requirements. While the participating number of banks in the market is small (aprox. 50 banks), Argentina is known for recurrent financial and liquidity shocks, partial and/or full, private or public, defaults on different contracts, all of which affects liquidity management of the financial sector.
We use daily data for the period 1st January 2015 to 31st December 2018. While the Call market has contracts ranging from 1 up to more than 30 days long, we concentrate in overnight contracts keeping the sample of transactions on 1 to 4 days range only. Networks are constructed on a monthly basis to capture the rich strategic relationships that can be formed among bank pairs. Thus we analyze 48 cross-section network structures (one for each month).
Consider a network G t of N t banks, where t indexes time (i.e. months). The dependent variable of interest is π it , that is, the net profit obtained in a given month from all lending and borrowing transactions, and defined as where h = 1, 2, ..., H t are the days within month t, N t corresponds to the banks that participate in the Call market during month t, L ij,h is the total amount i lent to j on day h at rate r ij,h , B ij,h is the total amount i borrow from j on day h at rate r ji,h .
We consider a separate network for each month from a total of 48 months (4 years). In each case we evaluate the proposed tests, LM µ,δ , LM µ , LM δ , LM µ(δ) and LM δ(µ) , and we compare them with [3] canonical tests for spatial dependence. In particular, we use Moran's I LM test for spatial dependence. The figures 5-7 computes p-values in log-scale from all the tests considered here.
Several features of the exercise can be highlighted. First, the proposed subgraph tests are different from test for spatial dependence. In order to show this we compute the joint test results for edge&triangle effects, LM µ,δ , and the Moran's I test for spatial error and spatial lag specifications. Figure  5 shows the p-values (in log-scale) of the tests for each month. The analysis reveals that in most cases, when LM µ,δ rejects (i.e. when the tests detect the presence of subgraph network random effects, of any type), spatial tests do not; and when spatial tests reject, only a few tests reject. This indicates that our proposed subgraph network structure is different from what would be captured by an model of spatial autocorrelation.
Second, there is heterogeneity across months in terms of the presence of edge, triangle, and edge&triangle effects. Figure 6 plots the test results for LM µ (marginal LM test for edge effects) and LM δ (marginal LM test for triangle effects). The figure reveals that there are more cases of only edge effects, while less so with triangle effects detected. When we explore this further using the robust LM tests in Figure  7, LM µ(δ) for edge effects controlling for triangle effects, and LM δ(µ) for triangle effects controlling for edge effects, a similar pattern applies. 7. Conclusion. This paper develops a simple model of subgraph network random effects that can be used to estimate the random structure with network data. It focuses on evaluating the appropriate level of effects, using the example of links' and triangles' effects as random components, and constructing a battery of specification tests.
Monte Carlo evidence shows that the tests correctly identify the type of network structure. Applying these tests to the Argentinean's unsecured Call interbank market reveals heterogeneity across time in terms of the type of subgraph network random effects.        Horizontal axis corresponds to tests for edge effects robust to triangle effects (LM µ(δ) ). Vertical axis corresponds to tests for triangle effects robust to edge effects (LM δ(µ) ).