{'fraction_non_alphanumeric': 0.031972772215735475, 'fraction_numerical': 0.015452264427496087, 'mean_word_length': 5.026047904191617, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 45, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Social Structure of Facebook Networks

We study the social structure of Facebook"friendship"networks at one hundred American colleges and universities at a single point in time, and we examine the roles of user attributes - gender, class year, major, high school, and residence - at these institutions. We investigate the influence of common attributes at the dyad level in terms of assortativity coefficients and regression models. We then examine larger-scale groupings by detecting communities algorithmically and comparing them to network partitions based on the user characteristics. We thereby compare the relative importances of different characteristics at different institutions, finding for example that common high school is more important to the social organization of large institutions and that the importance of common major varies significantly between institutions. Our calculations illustrate how microscopic and macroscopic perspectives give complementary insights on the social organization at universities and suggest future studies to investigate such phenomena further.


Introduction
Since their introduction, social networking sites (SNSs) such as Friendster, MySpace, Facebook, Orkut, LinkedIn, and myriad others have attracted hundreds of millions of users, many of whom have integrated SNSs into their daily lives to communicate with friends, send e-mails, solicit opinions or votes, organize events, spread ideas, find jobs, and more [Boyd and Ellison, 2007]. Facebook, an SNS launched in February 2004, now overwhelms numerous aspects of everyday life, and it has become an immensely popular societal obsession [Boyd, 2007b, Boyd and Ellison, 2007, Lewis et al., 2008b, Mayer and Puller, 2008]. Facebook members can create self-descriptive profiles that include links to the profiles of their "friends," who may or may not be offline friends. Facebook requires that anybody who one wants to add as a friend confirm the relationship, so Facebook friendships define a network (graph) of reciprocated ties (undirected edges) that connect individual users.
The emergence of SNSs such as Facebook and MySpace has revolutionized the availability of social and demographic data, which has in turn had a significant impact on the study of social networks [Boyd and Ellison, 2007, Krebs, 2008, Lievrouw and Livingstone, 2005. It is possible to acquire very large data sets from SNSs, though of course the population online and actively using SNSs is a biased sample of the broader population. Services like Facebook also contain large quantities of demographic data, as many users now voluntarily reveal voluminous amounts of detailed personal information. An especially exciting aspect of studying SNSs is that they provide an opportunity to examine social organization at unprecedented levels of size and detail, and they also provide new venues to test sampling effects [Kurant et al., 2011]. One can investigate the structure of an SNS like Facebook to examine it as a network in its own right, and ideally one can also try to take one step further and infer interesting insights regarding the offline social networks that an SNS imperfectly parallels.
Most people tend to draw their Facebook friends from their real-life social networks [Boyd and Ellison, 2007], so it is not entirely unreasonable to use Facebook networks as a proxy for an offline social network. (Of course, as noted by Hogan [2009], one does need to be aware of significant limitations when taking such a leap of faith.) Social scientists, information scientists, and physical scientists have all jumped on the SNS data bandwagon [Rosenbloom, 2007]. It would be impossible to exhaustively cite all of the research in this area, so we only highlight a few results; additional references can be found in the review by Boyd and Ellison [2007]. Boyd [2007a] also wrote a popular essay about her empirical study of Facebook and MySpace, concluding that Facebook tends to appeal to a more elite and educated cross section than MySpace. The company RapLeaf [Sodera, 2008] has compiled global demographics on the age and gender usage of numerous SNSs. Other recent studies have investigated the manifestation on SNSs of race and ethnicity [Gajjala, 2007], religion [Nyland and Near, 2007], gender [Geidner et al., 2007, Hjorth andKim, 2005], and national identity [Fragoso, 2006]. Preliminary research has also suggested that online friendship networks can be exploited to improve shopper recommendation systems on websites such as Amazon [Zheng et al., 2007].
Several papers have attempted to increase understanding of how SNS friendships form. For example, Kumar et al. [2006] examined preferential attachment models of SNS growth, concluding that it is important to consider different classes of users. Lampe et al. [2007] explored the relationship between profile elements and number of Facebook friends, and other scholars have examined the importance of geography [Liben-Nowell et al., 2005] and online message activity [Golder et al., 2007] to online friendship formation. Other papers have established strong correlations between network participation and website activity, including the motivation of people to join particular groups [Backstrom et al., 2006], the recommendations of online groups [Spertus et al., 2005], online messages and friendship formation [Golder et al., 2007], interaction activity versus sense of belonging [Chin and Chignell, 2007], and the role of explicit ideological relationship designations in affecting voting behavior . Lewis et al. [2008b] used Facebook data for an entire class of freshmen at an unnamed, private American university to conduct a quantitative study of social networks and cultural preferences. The same data set was also used to examine user privacy settings on Facebook [Lewis et al., 2008a].
In the present paper, we study the complete Facebook networks of 100 American college and universities from a single-day snapshot in September 2005. This paper is a sequel to our previous research on 5 of these institutions [Traud et al., 2010], in which we developed some of the methodology that we employ here. In September 2005, one needed a .edu e-mail address to become a member of Facebook, and the majority of "friendship" ties were within the same institution. We thus ignore links between nodes at different institutions and study the Facebook networks of the 100 institutions as 100 separate networks. For each network, we have categorical data encompassing the gender, major, class year, high school, and residence (e.g., dormitory, House, fraternity, etc.) of the users. We examine homophily and community structure (network partitions that are obtained algorithmically) for each of the networks and compare the community structure to partitions based on the given categorical data. We thereby compare and contrast the organizations of the 100 different Facebook networks, which arguably allows us to compare and contrast the organizations of the underlying university social networks that they imperfectly represent. In addition to the inherent interest of these Facebook networks, our investigation is important for subsequent use of these networks-which were formed via ostensibly the same generative mechanism online-as benchmark examples for numerous types of computations, such as new community detection methods.
The remainder of this paper is organized as follows. We first discuss the Facebook data and present the methods that we used for testing homophily at the dyad level and demographic prevalences at the community level. We then present and discuss results on the largest connected components of the networks, student-only subnetworks, and single-gender subnetworks. Finally, we summarize and discuss our findings.

Data
The data that we use was sent directly to us in anonymized form by Adam D'Angelo of Facebook. It consists of the complete set of users (nodes) from the Facebook networks at each of 100 American institutions (which we enumerate in Table A.1) and all of the "friendship" links between those users' pages as they existed in September 2005. The data clearly identifies most institutions, although there are a small number of disambiguation problems. For instance, 4 different "UC" institutions plus "Cal" are in the data, and there are 2 "Texas" listings. Each institution in the data includes a number appearing as part of its name that appears to correspond to the order in which each institution "joined" Facebook. The data can be downloaded at http://people.maths.ox.ac.uk/∼porterm/data/facebook100.zip.
Similar snapshots of Facebook data from 10 Texas institutions were analyzed recently by Mayer and Puller [2008], and a snapshot from "a diverse private college in the Northeast U.S." was studied by Lewis et al. [2008b]. Other studies of Facebook have typically obtained data either through surveys [Boyd and Ellison, 2007] or through various forms of automated sampling [Gjoka et al., 2010], thereby missing nodes and links that can impact the resulting graph structures and analyses.
We consider only ties between people at the same institution, yielding 100 separate realizations of university social networks and allowing us to compare the structures at different institutions.
We consider four networks for each of the 100 Facebook data sets: the largest connected component of the full network (which we hereafter identify as "Full"), the largest connected component of the student-only network ("Student"), the largest connected component of the female-only network ("Female"), and the largest connected component of the male-only network ("Male"). The Male and Female networks are each subsets of the Full network rather than the Student network. Each network has a single type of unweighted, undirected connection between nodes and can thus be represented as an adjacency matrix A with elements A ij = A ji indicating the presence (A ij = 1) or absence (A ij = 0) of a tie between nodes i and j. The resulting tangle of nodes and links, which we illustrate for the Reed College student Facebook network in Figure 1, can obfuscate any organizational structure that might be present.
The data also includes limited demographic (categorical) information that is volunteered by users on their individual pages: gender, class year, and (using anonymous numerical identifiers) high school, major, and residence. We use a "Missing" label for situations in which individuals did not volunteer a particular characteristic. The different characteristics allow us to make comparisons between institutions, under the assumption (see the discussion by Boyd and Ellison [2007]) that the communities and other elements of structural organization in Facebook networks reflect (even if imperfectly) the social communities and organization of the offline networks on which they're based. It is an important research issue to determine just how imperfect this might be [Hogan, 2009], but this is far beyond the scope of the present paper (though we hope that others will take on this particular challenge). The conclusions that we draw in this paper apply directly to the university Facebook networks from September 2005, and we expect that they can provide insight about the real-world social networks at the institutions as well.

Methods
We study each network at both the dyad level and the community level. We first consider homophily [McPherson et al., 2001, Newman, 2010, Wasserman and Faust, 1994) quantified by assortativity coefficients using the available categorical data.
For some of the smaller networks, we additionally perform independent logistic regression on node pairs to obtain the log odds contributions to edge presence between two nodes that have the same categorical-data value. We similarly fit exponential random graph models (ERGMs) [Frank and Strauss, 1986, Handcock et al., 2008, Lubbers and Snijders, 2007, Robins et al., 2007, Wasserman and Pattison, 1996 with triangle terms to these smaller networks. Finally, we partition the networks by algorithmically detecting communities [Fortunato, 2010, which we compare to the given categorical data using the technique in this paper's prequel [Traud et al., 2010]. Calculating assortativity values and log odds contributions allows us to examine "microscopic" features of the networks, while comparing algorithmic partitions of the networks to the categorical data allows us to examine their "macroscopic" features. As we illustrate below, both perspectives are important because they provide complementary insights.

Assortativity
A general measure of scalar assortativity r relative to a categorical variable is given by Newman [2003Newman [ , 2010: where e = E/ E is the normalized mixing matrix, the elements E ij indicate the number of edges in the network that connect a node of type i (e.g., a person with a given major) to a node of type j, and the entry-wise matrix 1-norm E is equal to the sum of all entries of E. By construction, this formula yields r = 0 when the amount of assortative mixing is the same as that expected independently at random (i.e., e ij is simply the product of the fraction of nodes of type i and the fraction of nodes of type j), and it yields r = 1 when the mixing is perfectly assortative.

Logistic Regression and Exponential Random Graphs
We further measure the influence of the available user characteristics on the likelihood of a "friendship" tie via a fit by logistic regression (under an assumption of independent dyads) and by an ERGM specification that includes triangle terms. Our focus is on trying to calculate the propensity for two nodes with the same categorical value to form a tie. We consider each of the four categorical variables (major, residence, year, and high school) and use the ERGM package in R [Handcock et al., 2008] for both models (treating each network as undirected). We used R 2.11.1 and the statnet package version 2.1-1, and we note that different versions of R and statnet caused different degrees of convergence with the structural elements in the model.
We obtained results for the 16 smallest institutions. (We did these calculations on a 32-bit operating system, which restricts the network sizes that can be processed.) Both models that we consider are based on a standard ERGM parametrization P θ {Y = A} = exp{θ · g(A)}/κ(θ) describing the distribution of graphs with model coefficients θ corresponding to statistics calculated from the adjacency matrix A (with a normalizing factor κ to ensure that the formula yields a probability distribution) [Frank and Strauss, 1986, Handcock et al., 2008, Lubbers and Snijders, 2007, Robins et al., 2007, Wasserman and Pattison, 1996.
In the first model (logistic regression), we include five statistics (with five corresponding θ coefficients): the total density of ties (edges) and the common classifications (nodematch) from each of four node/user characteristics: residence, class year, major, and high school. For example, the θ highschool contribution describes the additional log-odds predisposition for a "friendship" tie when two users are from the same high school. In all cases, we ignore possible contributions from missing characteristic data: two nodes with the same missing data field are not treated as having the same value for the characteristic. Rather than include gender explicitly in the model, we instead additionally fit the model to the single-gender subnetworks in order to be consistent with the treatment of gender in the community-level comparisons below. In the second model (an ERGM), we add a triangle statistic to account for the observed amount of transitivity in the network data. This gives a total of six θ coefficients: edges, common residence, common class year, common major, common high school, and the triangle coefficient.

Community Detection
The global organization of social networks often includes coexisting modular (horizontal) and hierarchical (vertical) organizational structures, and myriad papers have attempted to interpret such organization through the computational identification of "community structure." Communities are defined in terms of cohesive groups of nodes with more internal connections (between nodes in the same group) than external connections (between nodes in the group and nodes in other groups). As discussed at length in two recent review articles [Fortunato, 2010 and in references therein, the ensemble of techniques available to detect communities is both numerous and diverse. Existing techniques include hierarchical clustering methods such as single linkage clustering, centrality-based methods, local methods, optimization of quality functions such as modularity and similar quantities, spectral partitioning, likelihood-based methods, and more. Communities are considered to not be merely structural modules but are also expected to have functional im-portance because of the large number of common ties among nodes in a community.
For example, communities in social networks might correspond to circles of friends or business associates and communities in the World Wide Web might encompass pages on closely-related topics. In addition to remarkable successes on benchmark problems, investigations of community structure have observed correspondence between communities and "ground truth" groups in diverse application areas-including the reconstruction of college football conferences [Girvan and Newman, 2002] and the investigation of such structures in algorithmic rankings [Callaghan et al., 2007]; the investigation of committee assignments [Porter et al., 2005], legislation cosponsorship [Zhang et al., 2008], and voting blocs , Waugh et al., 2009 in the United States Congress; the examination of functional groups in metabolic networks [Guimerà and Amaral, 2005]; the study of ethnic preferences in school friendship networks [González et al., 2007]; and the study of social structures in mobile-phone conversation networks [Onnela et al., 2007] In the present paper, we investigate the community structures of the Facebook networks from each of the 100 colleges and universities. (See the visualization of the community structure for Reed College in Figure 2.) For each institution, we consider the Full, Student, Female, and Male networks. We seek to determine how well the demographic labels included in the data correspond to algorithmically computed communities. Assortativity provides a local measure of homophily, but that does not provide sufficient information to draw conclusions about the global organization of the Facebook networks. For example, two students who attended the same high school are typically more likely to be friends with each other than are two students who attended different high schools, but this will not necessarily have a meaningful community-level effect unless enough of the students went to common high schools.
As we we will see below, high school tends to be a much more dominant organizing characteristic of the social structure at the large institutions than at small institutions, presumably because of a significant frequency of common high school pairs at the large institutions.
We identify communities by optimizing the "modularity" quality function Q = , where e ij denotes the fraction of ends of edges in group i for which the other end of the edge lies in group j and b i = j e ij is the fraction of all ends of edges that lie in group i. High values of modularity correspond to community assignments with greater numbers of intra-community links than expected at random (with respect to a particular null model [Fortunato, 2010, Newman, 2006a). Although numerous other community detection methods are also available, modularity optimization is perhaps the most popular way to detect communities and it has been successfully applied to many applications [Fortunato, 2010. One might also consider using a method that includes a resolution parameter [Reichardt and Bornholdt, 2006] to avoid issues with resolution limits [Fortunato and Barthelemy, 2007]. However, our primary focus is on global organization of the networks, so we limit our attention to the default resolution of modularity. This focus arguably biases our study of communities to the largest structures, such as those influenced by common class year, making the observed correlations with other demographic characteristics even more striking.
To try to ensure that the communities we detect are properties of the data rather than of the algorithms that we used, we optimize modularity (with default resolution) using 6 different combinations of spectral optimization, greedy optimization, and Kernighan and Lin [1970] (KL) node-swapping steps (in the manner discussed by Newman [2006b]). Specifically, we use (1) recursive partitioning by the leading eigenvector of a modularity matrix [Newman, 2006a], (2) recursive partitioning by the leading pair of eigenvectors (including the Richardson et al. [2009] extension of the method in Newman [2006a]), (3) the Louvain greedy method [Blondel et al., 2008], and each of these three supplemented with small increases in the quality Q that can be obtained using KL node swaps. Each of these 6 methods yields a community partition, and we obtain our comparisons (described in Section 3.4) by considering each of these 6 partitions.
Modularity optimization is NP-hard [Brandes et al., 2008], so one must be cautious about the large number of degenerate partitions in the modularity landscape [Good et al., 2010]. However, by detecting coarse observables-in particular, the global organization of a Facebook network based on the given categorical data-and considering results that are averaged over multiple optimization methods, one can obtain interesting insights. The specific "best" partition will vary from one method to another, but some of the predicted coarse organizational structure of the networks (see below) is robust to the choice of community detection algorithm.

Comparing Communities to Node Data
Once we have detected communities for each institution, we will compare the algorithmically-obtained community structure to the available categorical data for the nodes. We recently developed a methodology to accomplish this goal in Traud et al.
[2010] (where we considered only 5 institutions among the 100 in order to illustrate the techniques). This method of comparison can be applied to the output of any "hard partitioning" algorithm in which each node is assigned to precisely one community (cf. "soft partitioning" methods, in which communities can overlap). We briefly review that methodology here.
To compare a network partition to the categorical demographic data, we standardize (using a z-score) the Rand coefficient of the communities in that partition compared to partitioning based purely on each of the four categorical variables (one at a time). For each comparisons, we calculate the Rand z-score z in terms of the total number of pairs of nodes in the network M, the number of pairs that are in the same community M 1 , the number of pairs that have the same categorical value M 2 , and the number of pairs of nodes that are both in the same community and have the same categorical value w [Traud et al., 2010]. The Rand coefficient is given in term of these quantities by S = [w + (M − M 1 − M 2 + w)]/M [Rand, 1971]. We then calculate the z-score for the Rand coefficient as [Hubert, 1977, Traud et al., 2010 where n is the number of nodes in the network, the coefficients C 1 and C 2 are given by n ij denotes an element of a contingency table and indicates the number of nodes that are classified into the ith group of the first partition and the jth group of the second partition, n i· = j n ij is a row sum, and n ·j = i n ij is a column sum. Each z-score indicates the deviation from randomness in comparing the community structure with the partitioning based purely on that single demographic characteristic. One needs to be cautious when interpreting such deviations from randomness as a strength of correlation. In particular, given the dependence on system size inherent in this measure, one should not overinterpret the relative values of z-scores from different institutions. Nevertheless, the z-scores provide a reasonable proxy quantity both for the statistical significance of correlation and for the relative strength of correlation in a specified network.

Results
We now use the methods outlined in the previous section to study the Facebook networks. We first follow the order of presentation above and then make some observations in combinations. Complete results are available in the tables in the appendix.

Assortativity
We tabulate the assortativities based on gender, major, residence, class year, and high school for all networks (and subsets thereof) in Table A (22) and Smith (60).

Dyad-Level Regression and Exponential Random Graphs
We use the two statistical models described in Section 3.2 to study the 16 smallest institutions. The (dyad-independent) logistic regression model includes contributions from edges (network density) and matched user (node) characteristics for each of four demographic variables. We present the results for this model in Table A.3. The second model that we consider is an ERGM, which supplements the first model with a structural triangle contribution. We present the results for this model in Table   A.4. These calculations give views of the networks at the microscropic (dyad-level) scale that supplement the results that we obtained using the assortativity statistics.
We consider the results from the 16 smallest institutions by fitting the models to each of their Full, Student, Female, and Male networks. Because all of the resulting model coefficients appear to be statistically significant at a p-value of less than 10 −4 , we interpret the importance of node matching on the different demographic characteristics directly from the magnitude of the corresponding model coefficients.
We summarize the results for these 16 institutions using the box plots in Figures   3

Comparison of Communities
We now discuss community-level results for each network using z-scores of the Rand coefficient to compare partitions obtained via algorithmic community detection to partitions based on each characteristic. That is, each community-detection result identifies a group assignment for each node, thereby producing a partition (called a "hard" partition) in which each node is assigned to exactly one community. One can also obtain a hard partition for each network by selecting a single characteristic and grouping nodes according to that characteristic. Every network that we study (including the subnetworks) has at least one z-score in the set {z Major , z Year , z HS , z Residence } with a value greater than 5. Although the distribution of Rand coefficients is decidedly not Gaussian, particularly in the tails of the distributions [Brook and Stirling, 1984, Kulisnkaya, 1994, Traud et al., 2010, this z = 5 threshold indicates that at least one characteristic in each network exhibits strong statistical significance. Moreover, we will see that the vast majority of our comparisons below exceed the z = 2 threshold. (That is, they essentially lie outside 95% confidence intervals.) To visualize and compare the varied strengths of organization according to the different demographic characteristics, we represent the four z-scores obtained for each network (Full, Student, Female, and Male) of an institution using 3-dimensional barycentric (tetrahedral) coordinates [Franklin, 2002, Weisstein, 2011. We start by setting all negative z-scores to 0, as all observed negative z-score values are small enough to be statistically insignificant. We then normalize by the sum of the z-scores to obtain From these 4 z-score values, we calculate coordinates X = (x 1 , x 2 , x 3 ) located inside a tetrahedron. For example, one can obtain a tetrahedron whose vertices are p 1 = (1, 0, 0), p 2 = (cos(2π/3), sin(2π/3), 0), p 3 = (cos(4π/3), sin(4π/3), 0), and p 4 = (0, 0, √ 2)) with the transformation The information from z 4 = 1 − (z 1 + z 2 + z 3 ) is implicitly included in (6) because of the normalization. Each of the 4 vertices of the tetrahedron corresponds to a limit in which the corresponding z-score completely dominates the other three z-scores.
That is, at a vertex, the entire z-score sum arises from the corresponding component.
Because of the strong role of class year, we visualize the tetrahedra from a perspective located above the vertex corresponding to class year and project the result into the opposing face of the tetrahedron. We calculate the point X for each of the 6 algorithmic partitions of each network (i.e., using the aforementioned 6 different community detection methods). For each institution, we plot a disk whose center lies at the midpoint of these 6 X coordinates. The width of each disk is proportional to the maximum observed difference between these 6 sets of coordinates (with these distances separated into bins of width .1, as indicated in the legends of Figures 5-8).
For example, in Figure 5, the Pepperdine (86)  We emphasize that the computed differences are much larger than the span of the depicted disks, whose sizes allow one to discern the results from different institutions.
In Figures 5-8, we show each of the 100 institutions, identified by number (see Table A.1), using a disk that we have color-coded according to the Cartesian distance of its center from the Year vertex. Class year is the predominant organizing category among the ones present in the data, so most of the institutions are located very close to the Year vertex. We zoom in on the Year vertex for each figure in order to better discern the relative importance of class year at the institutions. Importantly, the social organization of a few institutions differs considerably from that of the majority.
Each of these institutions lies close to the Residence vertex, so their community structures are organized predominantly according to dormitory residence. Foremost among these institutions are Rice (31) and California Institute of Technology (36).
As we discussed in Traud et al. [2010], California Institute of Technology (Caltech) is well-known to be organized almost exclusively according to its undergraduate "House" system [Looijen and Porter, 2007].
In repeatedly observing a strong correlation of class year with community structure, it is relevant to recall that the community detection method that we have employed optimizes modularity at the default resolution. Because of the resolution limit of modularity [Fortunato and Barthelemy, 2007], it might be interesting to explore individual networks at different scales using resolution parameters [Fortunato, 2010, Reichardt and Bornholdt, 2006]. We reiterate, however, that our focus in the present paper is on large-scale features rather than precise node membership of network partitions.
In Figure 5, we show the social organization tetrahedron for the Full networks (i.e, for the the largest connected components of the complete networks) for each institution. Although the community structure of nearly all of the Full networks are organized overwhelmingly by class year, a few of them are also heavily influenced by dormitory residence. (We already mentioned above that Rice (31) and Caltech (36) are organized predominantly by Residence.) For example, dormitory residence also dominates the community structure at UC Santa Cruz [UCSC] (68), though to a lesser extent than at Rice and Caltech. We also observe relatively high Residence z-scores at Smith (60), Auburn (71), and University of Oklahoma (97). Major seems to be most important relative to the other available characteristics at Oberlin (44) and Maine (59), though in both cases its relative correlation pales in comparison to that of class year. High School seems to be most important at USF (51) and Tennessee (95), though class year is again more important. Most of the institutions are clustered tightly near the Year vertex, but Residence can often be rather important (and sometimes even the most important category, as we have seen in three cases).
In Figure 6, we show the social organization tetrahedron for the Student networks

Discussion
As described above, we see using the z-scores of the Rand coefficients for demographic characteristics versus algorithmic community assignments that Year is the strongest organizing factor at most institutions but that Residence is much more important for the community organization at some institutions than at others. The correlation with Residence is especially prominent at Rice (31) and Caltech (36).
We also observe that the Male networks tend to be more scattered around Year, as some institutions exhibit a stronger correlation with Major, whereas others have a stronger correlation with high school. This suggests that there are potential differences in the gender patterns of friendships, which would be interesting to investigate in future studies with new data. We do not explore this general issue further and instead attempt to identify interesting comparisons with the results that we obtained above. Although it is of course impossible to be exhaustive in our observations, we present all of our assortativity values, regression model coefficients, and communitycomparing z-scores in the tables in Appendix A. We also highlight some interesting facets of our results.
Of particular interest is the comparison of results from the dyad-level regression models to those from community-level correlations. We note in particular that the logistic regression and exponential random graph models that we employed for the smallest 16 institutions specify that almost all institutions and all of their subnetworks give the highest model coefficient contribution towards a link between nodes from a common High School. However, as we have seen-and which is particularly evident using the visualizations with tetrahedra-at the community level, most institutions are organized by class year and have a relatively small correlation with high school.
Even in the rare cases in which the rank ordering of the four correlations (with Year, Residence, Major, and High School) at the community level matches that obtained via dyad-level model coefficients, such as with the logistic regression model for the Full and Female networks from Caltech (36), the relative sizes of the contributions at the dyad level are completely different from those observed at the community level. Caltech supplies an illustrative example of the different insights obtained from community-detection versus logistic regression and exponential random graph models both because of its small size and because of its outlying correlation with dormitory residence at the community level. A simple interpretation of the apparent dichotomy between the dyad-level model coefficients and the correlations at the community scale is that the presence of two students from the same high school at a small institution like Caltech yields a significant increase in the likelihood of a tie between those students. Even though the corresponding model coefficient is smaller than in any of the other of the 16 smallest institutions, it is comparable to that for common residence (called "Houses" at Caltech). Nevertheless, the very small number of node pairs at Caltech that have the same high school relative to the total number of node pairs has a very small effect at the community level, as the algorithmically obtained communities are correlated overwhelmingly with House affiliation. The ERGM result with triangle contributions makes this distinction even more striking, as the common high school coefficient is actually larger than the coefficient from common House.
We also observe other features that might be worthy of future investigation using other data sets and methodologies. We report the results of our calculations in depth in Tables A.1 gives the second largest z-score for the Female network at UVA (16), the third largest z-score for UVA's Male network, and the fourth largest z-score for its Full network.
The communities in the Auburn (71)

Conclusions
We have studied the social structure of Facebook "friendship" networks at one For example, in the Caltech networks, the assumed ground truth of the importance of the House system is captured better by computing community structure.
This "real-world ensemble" of 100 networks formed by ostensibly similar mechanisms has the potential to provide a testing ground for various models of network formation. Because of the useful comparisons such an ensemble of data can facilitate, this data will similarly be useful for studies of dynamic processes on networks, algorithmic community detection, and so on. Because of the different rates of initial settings. The Facebook data suggests that women are typically more likely to have friends within their common residence (among the demographic data to which we have access) but that the characteristics in the communities in the male-only net-works exhibit a wider variation. Investigating this thoroughly would require different data sets and methodologies, especially if one wishes to discern the causes of such friendships from observed correlations.
The Facebook networks that we study offer imperfect representations of corresponding real-life social networks, which have different properties from online social networks. It is thus crucial that our results are complemented by studies of the corresponding real networks in order to quantify the extent of such differences.   Figure 1. Node shapes and colors indicate class year (gray dots denote users who did not identify an affiliation), and the edges are randomly shaded for easy viewing. We place the communities using a Fruchterman and Reingold [1991] layout and use a Kamada and Kawai [1989] layout to position the nodes within communities [Traud et al., 2009]. (Right) The same network layout but with each community depicted as a pie. Larger pies represent communities with larger numbers of nodes. Darker edges indicate the presence of more connections between the corresponding communities.

Appendix A. Tables
In Table A.1, we give for each of the 100 institutions the numbers of nodes and edges for each of the Facebook networks (and subsets thereof) that we have investigated. In Table A Recall that we studied regression models for the 16 institutions with the smallest Facebook networks. In Table A.4, we report the results of a logistic regression model with edge and nodematch terms. (All coefficients differ from zero with p-values less than 1 × 10 −4 .) In Table A.5, we similarly report the results of an ERGM that supplements the logistic regression model with triangle terms. (Again, all resulting model coefficients differ from zero with a p-value of less than 1 × 10 −4 .) In Table A.5, we report the maximum z-score for each demographic category that we obtained from the 6 different community detection partitions (described in the text) of each Facebook network (and their subsets) compared to categorical partitions based on each of Major, Residence, Year, and High School. We divide the networks in this table into five sections: (1) networks for which the High School category gives the highest z-score; (2) networks for which the Residence category gives the highest z-score; (3) networks for which Year gives the highest z-score and High School gives the second highest; (4) networks for which Year gives the highest z-score and Major gives the second highest; and (5) networks for which Year gives the highest z-score and Residence gives the second highest.      (Full, Student, Female, and Male) for each of the 100 institutions. We italicize z-scores that are less than 2. We divide the table into five parts: (1) networks in which High School yields the highest z-score, (2) networks in which Residence yields the highest z-score, (3) networks in which Year yields the highest z-score and High School yields the second highest z-score, (4) networks in which Year yields the highest z-score and Major yields the second highest z-score, and (5)