Ethnic In-and Out-Group Friendships Going Into Early Adolescence: Prevalence, Quality, Stability, and the Role of the Network Structure

The present study sought to investigate the friendship formation of ethnic in-and out-group friendships, as well as differences in stability and quality, while accounting for the network structure (such as the tendency to befriend friends of friends). We analyzed longitudinal data from 770 students from 42 Austrian primary school classes collected over the course of their last year of primary school. First, friendship prevalence, quality and stability were investigated using multiple regression quadratic assignment procedures. Then, friendship creation and stability were modeled over time using multilevel stochastic actor-oriented models. The results did not show significant differences between the creation of in-and out-group friendships; however, it was found that in-group friendships were more stable over time. The results further underscore the importance of considering network structure effects when analyzing intergroup friendship prevalence, creation, and stability.


Introduction
Individuals tend to be friends with others who are similar to them, a term known as friendship homophily (McPherson et al., 2001). This is also true with respect to cultural or ethnic similarity. Students are more likely to be friends with others from the same ethnic or cultural group (in-group friendship) than from a different group (out-group friendship) (e.g., Stefanek et al., 2015;Titzmann, 2014;Smith et al., 2014). Much of existing research in this area has focused on adolescents and although there is evidence to suggest that cultural or ethnic friendship homophily is already present in childhood, we know less about in-and out-group friendships in childhood and preadolescence. In particular, detailed studies of the characteristics of these friendships (e.g., friendship quality and stability) and the role of the friendship network structure in which they are embedded are still largely missing for this age group.
It is likely that friendships between members of different ethnic groups throughout childhood and on the verge to adolescence function differently than they do in adolescence, as children attach different needs and expectations to their friendships than adolescents do (Sullivan, 1953;Simpson, 2001). Moreover, friendships are not formed in isolation, but rather are embedded in complex networks (Knecht et al., 2011). For example, individuals tend to become friends with the friends of their friends and the formation of a new friendship can be influenced by already existing friendship connections, a process known as transitivity (e.g., Block, 2015). These specific dynamics and the role they play in the formation and stability of ethnic in-and out-group friendships have rarely been investigated in this age group. To fill this gap, our study uses data collected at the beginning and end of students' last year of primary school. In addition, studies (even those on other age groups) rarely differentiate between the creation of new friendships and the stability of existing friendships, even though creating new friendships and maintaining existing ones may be driven by different processes and thus may be influenced differently by in-group and out-group memberships. By applying dynamic multilevel social network analysis techniques, our article offers new insights into the prevalence, quality, creation and stability of ethnic in-and out-group friendships.

Ethnic In-and Outgroup Friendships
Students spend a considerable amount of time with their classmates and establish networks of friends in class. Friendships are defined as dyadic and reciprocal relations (Hartup, 1996), involving liking each other and spending time together (Boda, 2021), and are a crucial part of children's and adolescents' lives. Friendships help children and adolescents find emotional and social support, buffer against negative experiences, and make an essential contribution to building self-esteem and self-awareness (Berndt & Perry, 1986). For children and adolescents from an immigrant background, friendships also play an important role in acculturation, as their friends can stem from their own country of origin (ethnic in-group friendships), another minority country of origin or the majority country they live in (ethnic outgroup friendships). Both ethnic in-and out-group friendships are valuable. In-group friendships are critical for children's and adolescents' identity development and can support students well-being as they provide them with a sense of safety and protection (Graham et al., 2014;Jugert et al., 2020; see also Jugert & Titzmann, 2019). A specific focus has been put on cross-ethnic friendships as they play a particular role in reducing intergroup bias, stereotypes and prejudice. Recent developmental research has highlighted the power that out-group friendships hold in promoting positive intergroup relations. Intergroup bias starts at a very young age, but having cross-group friendships can counteract this development by improving social competence, reducing barriers and laying the foundation for rejecting stereotypes (Killen et al., 2021;Yip et al., 2019). This strand of research further highlights the role of schools in providing the opportunity for quality contact that enables outgroup friendships to form.
However, although schools become increasingly multicultural, friendship networks often remain highly segregated by ethnicity or cultural background (Leszczensky & Pink, 2015). In secondary schools, two students are more likely to be friends if they are from the same ethnic group, even when accounting for how many out-group friends would potentially be available (=opportunity structure) (e.g., Leszczensky & Pink, 2015). This preference is well-documented across different ethnic groups and in different countries (see e.g., Boda & Néray, 2015;Moody, 2001;Fortuin et al., 2014;McDonald et al., 2013;Stefanek et al., 2015). As different parts of the world have different histories of migration and immigration, there are a variety of studies that use different group memberships to study in-and out-group friendships along the lines of "ethnicity", "race" or "culture". These terms are often used interchangeably and are overlapping, making it hard to distinguish between nationality, ethnicity, and culture both conceptually and empirically (Jugert et al., 2022). Many European studies use the term "ethnic group", which they often equate with countries of origin (e.g., Smith & Schneider, 2000;Lorenz et al., 2021). Ethnicity can be defined as "a characterization of a group of people who see themselves and are seen by others as having a common ancestry, shared history, shared traditions, and shared cultural traits such as language, beliefs, values, music, dress, and food' (Cokley, 2007, p. 225).
Despite the profoundly different histories of migration in different countries and profound differences in how different studies operationalize, assess and label group membership, previous studies have repeatedly found an overrepresentation of in-group friendships with respect to ethnicity and culture. There seem to be powerful processes going on in classrooms that lead to an overrepresentation of in-group friendships. Research so far has identified different factors that are associated with the formation of these in-and outgroup friendships. They are influenced by the broader school context, such as, for example, the overall diversity of the school, which can shape the number of in-and out-group friendships above its effects on the mere availability of possible out-group friends (McGlothlin & Killen, 2010). Moreover, the overall school or classroom climate can create optimal conditions for outgroup friendship formation by conveying social norms that express the value of having out-group friends and encourage the formation of such friendships (Green et al., 1988;Jugert et al., 2011;Tropp et al., 2016).
Issues are further complicated by the fact that friendships are not only influenced by external factors, but also by each other, which has the potential to increase network segregation. In particular, the powerful process of transitivity (befriending friends of friends) may amplify the effect of homophily: If friends are more likely to be similar, connecting to friends of friends can further increase the proportion of in-group friendships through the development of ethnically/culturally homogeneous friendship clusters over time (Grund & Densley, 2015), highlighting the importance of taking the network structure into account when analyzing in-and out-group friendships.

Friendships Throughout the Developmental Trajectory of Childhood and Early Adolescence
On the individual level, children and adolescents may find specific features in in-group peers that facilitate friendship formation. Immigrant children and adolescents and those with immigrant parents encounter numerous migrationspecific experiences and challenges (Motti-Stefanidi & Masten, 2013), such as moving to another country, speaking two languages, facing different cultural norms and expectations, and dealing with discrimination. Other youth from immigrant backgrounds may share these experiences. It is thus plausible that it is easier to connect and build closer relationships with peers from similar immigrant backgrounds. Over the course of adolescence, intimacy, trust and support in friendships become even more important, a possible reason why adolescents turn even more to in-group friendships as they get older (Epstein, 1989;Hartup & Stevens, 1997). Indeed, age seems to play an important role in whether and how ethnicity or culture is considered in peer relations. Existing evidence alludes to the fact that homophily with respect to culture or ethnicity can already be present in younger students to some extent, but gets stronger as they get older. Aboud and colleagues (2003), for example, found that in a sample of primary school students in North America, only children in 5th grade, but not lower grades, exhibited a same-ethnic friendship preference. Not entirely in line with this, a study conducted in primary school (1 st through 6 th grade) found that children exhibited a stronger tendency to segregate by gender than by ethnicity (Lee et al., 2007). However, there is further evidence suggesting that friendship homophily gradually becomes stronger: Another study with primary school students in grades 1, 3 and 5 showed that all students in Grades 3 preferred same-over cross-ethnic friends, but not all ethnic groups did so in Grade 1 (Serdiouk et al., 2019). In another study, children in third grade had the lowest levels of homophily, fourth graders had moderate levels of racial homophily, and fifth graders displayed the highest levels of racial homophily (Cappella et al., 2017). Late childhood and preadolescence is a particularly interesting phase to study these friendships as it is accompanied by many developmental changes, i.e. changing needs in friendships, at the same time as intergroup bias rises (Abrams & Rutland, 2008), yielding in a growing preference for in-group friendships throughout childhood and ultimately in a strong preference for in-group friendships in adolescence. Still, as research on this topic has focused on adolescents, there is a lack of understanding of how in-and out-group friendships form in this age group, how they behave in terms of, for example, quality and stability, and what role the surrounding friendship network structure plays.

Friendship Quality and Stability for In-and Out-Group Friendships
Friendship quality and stability are key characteristics of friendships (Berndt, 1989). Friendship quality describes qualitative aspects of a friendship, such as intimacy and support, whereas stability refers to the temporal stability of a friendship (i.e., how long it lasts). Researchers have addressed the question of how ethnic in-and out-groups friendships differ by studying friendship quality and stability. However, empirical results so far have been inconclusive. Studies have identified both similarities as well as differences in friendship quality between ethnic in-and out-group friendships. In-group friendships have been found to be characterized by greater closeness, mutual trust and perceptions of helpfulness (Kisfalusi, 2016) and more shared activities (Kao & Joyner, 2004). Conversely, some studies have found no differences at all (Lessard et al., 2019;Alvarez Valdivia et al., 2016;McDonald et al., 2013;Reinders & Mangold, 2005). As a whole, friendship quality increases from middle childhood to early adolescence, and continues to further increase throughout adolescence, as friendships become more and more central to children as they grow older (Xu et al., 2020;Way & Greene, 2006).
In general, hardly any studies have investigated the quality of ethnic in-and out-group friendships for children before adolescence. The scarce research that has been conducted with children at that age found either no differences (Aboud et al., 2003;Aboud & Sankar, 2007) or only slight differences with ingroup friends spending more time with each other outside of school than friends from different groups (Strohmeier et al., 2006).
Existing findings on the stability of out-group friendships are much more consistent. Among adolescents, cross-ethnic friendships have been found to be less stable, meaning they do not last over a longer period of time (e.g., Hallinan & Williams, 1987). It seems that once cross-ethnic friendships are formed, they are more fragile and more easily dissolved. Again, the majority of studies have focused on adolescents and the stability of their friendships. However, there is evidence suggesting that cross-ethnic friendships among children in lower grades also tend to be less stable (Lee et al., 2007) or even decline over the course of one school year (Aboud et al., 2003).
Taken together, empirical evidence on friendship quality among primary school students is sparse, making it difficult to obtain a comprehensive picture of the nature of ethnic in-and out-group friendships among children before they enter adolescence. Regarding stability, the few existing studies' findings suggest that children's cross-ethnic friendships are less stable. In addition, prior research has typically selected certain ethnic groups (e.g., only Turkishorigin students) in a classroom and studied them together with majority students (see e.g., Titzmann & Silbereisen, 2009). This strategy disregards the multicultural reality in today's classrooms, while it is important to study friendship networks in their entirety, including all ethnic groups present in the class.

Network Effects
Friendships are embedded in networks that are characterized by specific features, such as the transitivity effect or the tendency to be friends with those who are popular (= "indegree popularity" effect). These features influence friendship selection and characteristics (Snijders, 2001). Only in recent years has it become more common to employ social network analysis to study inand out-group friendships (Kornienko & Rivas-Drake, 2021). Its ability to consider dynamic network effects makes social network analysis an especially powerful tool for studying intergroup relations, which can be particularly sensitive to network effects. For example, in line with contact theory, continuous and positive intergroup contact fosters positive intergroup attitudes, which can lead to more out-group friendships (e.g., Allport, 1954;Pettigrew & Tropp, 2008). But if network structures make it more difficult to come into contact with out-group members, there is no opportunity to develop positive intergroup attitudes and thus more out-group friendships. Along those lines, if children start with only in-group friends, they will be more likely to befriend even more in-group peers over time due to the tendency to befriend friends of friends-an effect that only a social network analysis can account for. Nevertheless, the specific processes underlying these network effects are still widely understudied, especially in younger children (Neal, 2020). So far, studies using social network analysis have found homophily effects in ethnic friendship networks (e.g., Chávez et al., 2021;Rivas-Drake et al., 2018), but social network analysis has rarely been used to investigate the stability of intergroup friendships, and to our knowledge, has never been used to investigate friendship quality. Using social network analysis in German classrooms, Jugert and colleagues (2013) found 10-year-old students 'crossethnic friendships to be less stable than same-ethnic friendships. However, studies on students this age or younger are sparse and there is a lack of studies using social network analysis to study ethnic in-and out-group friendships and their characteristics, despite their great potential to gain new insights into why in-group friendships are overrepresented and how they function.

The Present Study
The present study sought to investigate the friendship formation of ethnic inand out-group friendships, as well as differences in stability and quality, while accounting for network effects. Furthermore, we considered every ethnic group (including the "majority" group, i.e. Austrian/no recent immigrant background) in the classroom. This study is innovative, as it deepens the current knowledge on friendship patterns in late childhood going into early adolescence by (a) using longitudinal data from the last year of primary education, (b) considering network effects to investigate the formation of, as well as differences between ethnic in-and out-group friendships friendships in terms of their quality and stability, and (c) using the entire network present in the classroom.
The demography of Austria is characterized by migration-related growth, with the largest group of newcomers in recent years stemming from countries that joined the European Union in 2004 or later (i.e., Poland, Romania, etc.). Before that, the largest number of immigrants to Austria stemmed from Turkey and the former Yugoslavia. In the past 3 years, almost every fourth child in primary school spoke as a first language a language different from German (Oberwimmer et al., 2021), which illustrates the diversity in the Austrian educational context.
We consider an ethnic in-group friendship to be a reciprocal friendship nomination by two students from the exact same ethnic group; this can be two friends from the same minority ethnic group (e.g., two students with a Turkish background) or two friends from the ethnic majority (Austrian) group. An ethnic out-group friendship is therefore a friendship tie between either a majority (Austrian) and a minority (e.g., Turkish) member, or between a minority (e.g., Turkish) and another minority (e.g., Croatian) group member.
We investigated the following three main research questions: (1) Who are students friends with in terms of ethnic membership? We investigated the prevalence of ethnic in-group friendships, controlling for opportunities to befriend someone from a different ethnic group (i.e., taking into account how many ethnic in-and out-group peers are present in the classroom) and network effects (the effects of reciprocity, transitivity, transitive reciprocity, and degree effects). We expected to find an overrepresentation of in-group friendships.
(2) Is there a difference in friendship quality between ethnic in-and outgroup friends? As there is almost no evidence on the friendship quality of out-group friendships in younger children, and as the current evidence for adolescents is inconclusive, we did not hypothesize whether in-or out-group friendships would be of higher quality.
(3) Is there a difference in friendship stability between ethnic in-and outgroup friendships? We addressed this research question by separating creation (i.e., creating a new friendship tie) and stability in our models, controlling for the opportunity structure and network effects (the effect of reciprocity, transitivity, transitive reciprocity, as well as degree effects on the creation and stability of ties). In line with previous research, we expected ethnic out-group friendships to be less stable than in-group ones.
Additionally, for our main models, we used a proxy of socio-economic status (SES) as a control variable, as SES has consistently been shown to be strongly related to having an immigrant background. We also included students' gender, as this represents an important source of homophily among children (McPherson et al., 2001) and is therefore crucial for the correct reconstruction of network structure.

Sample and Procedure
Data were collected as part of a larger project on inclusion in Austrian primary schools (ATIS-STEP). The project was approved by the Styrian Provincial School Authority and included data provided by students as well as their parents and teachers. The final sample in this study consisted of data on 770 Grade 4 primary school students (42.6% female) in the federal state of Styria, Austria. In Austria, students usually start first grade at age 6 and are therefore 9-10 years old in 4th grade. Grade 4 is the last year of primary school in Austria. Students were considered to belong to a specific minority ethnic group when either they and/or both of their parents were born in this specific country outside of Austria. In total, the students represented 48 minority groups. Students considered to be Austrian made up 50.6% of the sample, the rest had an immigrant background of some sort (either they or both their parents were born outside of Austria). Hence, the largest group indicated to be from Austria (50.6%), followed by Bosnia (5.6%), Turkey (4.7%), Romania (2.3%), Croatia (2.2%), Kosovo (1.9%), and Egypt and Chechnya with 1.8% each. For 19.6% of students, no ethnic group could be assigned due to missing information. All other ethnic groups made up less than 1 percent of the sample. At Time 1, 42 classes participated, whereas only 34 classes provided data at Time 2, resulting in a reduced sample size of 633 at Time 2. Data were gathered once at the beginning of the school year and once at the end of the school year. After receiving instructions from trained research assistants, students filled out paper-pencil questionnaires during one class period (approx. 50 minutes).

Measures
Friendships. To assess students' friendships, students were asked to name up to five persons they consider their best friends in class ("peer nomination technique"; Coie et al., 1982), a technique that is most commonly used to assess sociometric data (see e.g., Yugar & Shapiro, 2001). We constricted the maximum number of friends to five for two reasons: (a) Most studies limit best friendship nomination, as it is unlikely that many students would want to nominate more than 5 best friends, (b) students had to answer four questions regarding friendship quality for each nominated friend. Hence, the more friends they nominated, the more items they needed to respond to, which can be frustrating and tiresome and thus potentially reduce data validity (Terry, 2000).
Friendship Quality. Students indicated the friendship quality for each nominated friend on a four-item scale (Bossaert et al., 2015). The scale encompassed three components of friendship quality: companionship ("I spend fun time with him/her"), intimacy ("I share private thoughts and feelings with him/ her"), and support ("I ask him/her for help, advice, and support"; "This person sticks up for me"). We calculated Coefficient Alpha to test the internal consistency of the friendship quality scale, which was .74 in the first wave and .77 in the second wave.
Ethnic Background. Students and their parents answered a set of questions regarding their and their parents' place of birth ("In what country were you born/In what country was your mother/father born?"). If students did not provide information on this question, information provided by their parents (also in the form of questionnaires) on their birthplaces was used. A student was considered a member of a specific ethnic group if either the student or both of the student's parents were born in a country where this ethnic group is dominant.
Control Variables. Gender (coded as 0 = female, 1 = male) and a proxy of SES assessed via a question asking students to indicate whether they have their own room at home (0 = do not have own room, 1 = own room; item taken from the Family Affluence Scale, see e.g., Kehoe & O'Hare, 2010;Boyce et al., 2006) were used as control variables to control for key demographic characteristics.

Statistical Models
Descriptive Differences in the Quality and Stability of In-and Out-Group Friendships. In order to see whether in-or out-group friendships are of higher friendship quality, average friendship quality ratings of in-group ties and out-group ties were calculated for each classroom as well as for all classrooms together at both waves. Then, t-tests were performed to assess significant differences between in-group and out-group friendship quality ratings.
To investigate whether in-group friendships were more stable than outgroup friendships, we looked at the proportion of first-wave friendships that still existed at the second wave for both in-and out-group ties, again for each classroom and for all classrooms together. Significant differences were checked for using t-tests.
Multiple Regression Quadratic Assignment Procedure to Descriptively Investigate the Prevalence of Same-and Cross-Ethnic Friendships. To assess the prevalence of out-group friendships compared to in-group ones, we conducted crosssectional analyses. Specifically, we applied multiple regression quadratic assignment procedure (QAP regression/MRQAP), a regression framework for network data (Dekker et al., 2007). The main advantage of this method is that it takes into account the fact that observed friendship nominations are not independent of one another; the significance of the estimates is therefore calculated using permutations (Dekker et al., 2007). The dependent variable in the analysis was the (non-)friendship between each pair of actors (i.e., individual students), i.e., a binary variable coded as "1" if a friendship nomination existed and "0" if not. The independent variable was a dummy variable expressing whether each dyad belongs to the same ethnic group (value 1) or not (value 0). In this way, MRQAP tests take dependencies between social ties that might correspond with ethnic group membership into account. We first performed the estimation for each class separately, before conducting the analyses again for all classes together. In this second step, we estimated an overall regression coefficient for the whole dataset, allowing us to take advantage of a larger sample size (similar to Block, 2015;Elmer & Stadtfeld, 2020).
As our research question did not include potential differences between specific ethnic groups and considered two different minority group members as out-group members as much as a minority-majority out-group tie, we calculated robustness checks to check for different types of nominations. We estimated the friendship probabilities (using MRQAPs) for multiple nomination types: We differentiate between two kinds of in-group ties (samemajority-group and same-minority-group ties) and three kinds of out-group ties (majority-group to minority-group, minority-group to majority-group, minority-group to different-minority-group).
Stochastic Actor-Oriented Models to Investigate Prevalence, Quality and Stability of Friendships While Accounting for Network Effects. To examine the dynamics of in-and out-group friendships, we applied stochastic actor-oriented models (SAOMs), which were developed to analyze social network panel data (Snijders, 2001;Snijders et al., 2010). These models use simulations to make inferences about the social processes that govern network evolution. The evolution process is represented as a sequence of single tie changes, similar to an agent-based simulation. In each step, one randomly selected actor is given a chance to create or terminate an outgoing network tie (or do nothing). The first wave of data serves as a starting point for the simulation, and the second wave is modeled based on this starting point. Change probabilities are flexibly modeled using a set of theoretically assumed independent variables ("effects"), weighted by parameters that are estimated by the model. We applied the Bayesian random-coefficient multilevel version of this model (Ripley et al., 2022;Koskinen & Snijders, in preparation; for an empirical application, see Boda, 2018). Following guidelines by Ripley at al. (2022), we specified all variables except our main variable of interest (same-ethnic membership) as randomly varying. We also followed Ripley et al.'s (2022) recommendations when choosing prior distributions and assessing convergence.
In the SAOM framework, there are various ways to estimate models. The most common is an evolution model, which models how the network evolves over time and estimates parameters that jointly capture the creation of new ties and the stability of existing ties (e.g., individuals are more likely to both create new friendship ties and maintain existing friendship ties towards those who are from the same ethnic group). In line with this, we first estimated a friendship evolution model. Another approach is to separate between creating new ties and existing ties when estimating model parameters; these models are called creation and stability models. Because in this article we were particularly interested in the stability of already existing friendships, in a second step, we therefore separated these two processes in a creation and stability model. Hence, we addressed our research questions with two separate models: (a) an evolution model, (b) a creation and stability model.
The dependent variable in both analyses was friendship (1 = if a new friendship was created/existing friendship was maintained, 0 = otherwise). In the models distinguishing between creation and stability, we estimated two sets of parameters for our independent variables: one for the creation of new ties, and one for maintaining existing ties. The main independent variable was ethnicity: a dummy-coded variable with a value of "1" if the dyad belonged to the same ethnic group and "0" otherwise.
We also included variables that captured the network structure. These included (a) reciprocity: the tendency to name people as friends who also name oneself as a friend (reciprocity variable); (b) transitivity: the tendency to name friends of friends as friends (transitive triplets variable); (c) the interaction between the two (transitive reciprocated triplets variable); (d) indegree popularity: the tendency to name as friends who are already named by many others; (e) outdegree popularity: the tendency to name people as friends who themselves name many friends; (f) outdegree activity: the tendency for people who name many friends to name additional friends. Of these, transitivity is particularly crucial to take into account when modeling ethnic outgroup relations, because the preference for friends of friends may strengthen existing ethnic segregation in groups even in the absence of additional ethnic in-group preferences. Not taking this factor into account could thus lead to an overestimation of the effect of in-group preferences. In addition, we included control variables for important attribute-based explanations for friendship: (a) same gender, and (b) a proxy for socio-economic status.
All analyses for the SAOMs were calculated on a subsample in which only classrooms with a low number of missing cases (fewer than 25%) were included (yielding in a sample size of N = 344), to ensure a high quality data set as network data are highly sensitive to missings. In addition, the analyses were run on a larger dataset including the classrooms with more than 25% (but fewer than 50%) missing to better match the sample used in our descriptive analyses. The results based on the entire dataset can be found in the appendix (Tables A3 and A4).

Descriptive Prevalence of In-and Out-Group Ties
The results concerning the prevalence of in-group compared to out-group friendships are presented in Table 1. This table shows the individual QAP regressions for each classroom and each wave, as well as multigroup QAP regressions for all classrooms together in each wave. Table 1 displays individual regression coefficients and corresponding p-values of difference for each classroom and wave as well as the overall coefficient for the whole sample. Classes for which results were statistically significant (p ≤ .05) are in bold.
We found significant differences between the probabilities of a friendship in an in-group dyad and an out-group dyad in 7 out of 42 classrooms in the first wave and 4 out of the 34 classrooms (for which we had information) in the second wave. In the multigroup models, the differences between nomination types were strongly significant in both waves, with out-group friendships being more likely than in-group friendships. The overall parameter value of 0.20 for cross-ethnic ties indicates that for any cross-ethnic dyad, the probability of them being friends is 20%. The same goes for the overall parameter value of 0.24 for same-ethnic ties means that for any same-ethnic dyad, the probability of them being friends is 24%. This shows that the probability of a friendship in a same-ethnic dyad is 4 percentage points higher than in a cross-ethnic dyad. The p-value indicates a significant difference between these probabilities. The same can be seen in wave 2, with the probability of an in-group dyad to be friends being 4 percentage points higher than an out-group dyad to be friends (25% vs. 21%). It can therefore be concluded that students tend to form more in-group friendships in both waves, even when taking the friendship opportunity structure (including network structure) into account, thus answering our first research question.
To check for differences between majority-group and minority-group ties, we estimated the QAP regressions for two kinds of in-group ties (samemajority-group and same-minority-group ties) and three kinds of out-group ties (majority-group to minority-group, minority-group to majority-group, minority-group to different-minority-group). The results are presented in the Appendix, Table A1. The results showed that all out-group ties are significantly less likely than same-majority-group ties, which served as the reference category (except for different-minority-group ties in the second wave, which were still less likely but this parameter was not significant). At the same time, same-minority-group ties were significantly more likely than same-majoritygroup ties. This shows, first, that there were some differences between different in-group ties. However, second, all in-group ties were more likely than out-group ties, and therefore comparing all in-group ties to all out-group ties was not unreasonable.

Descriptive Differences in the Quality of In-and Out-Group Friendships
To compare the quality of in-and out-group friendships once they had formed, we calculated the average friendship quality ratings of in-group ties as well as out-group ties for all classrooms and both waves. Table 2 shows the mean friendship quality ratings for both types of friendships, as well as the standard deviation around the mean and the results of a t-test of whether or not in-and out-group friendships were significantly different in their quality. Three individual classrooms in the first wave and three in the second wave showed significant differences in quality. In two of the three classrooms in the first wave, same-ethnic friendships had a lower quality than cross-ethnic ones. In the third classroom, out-group friendships were found to be of lower quality.
In the second wave, there were again two classrooms in which in-group friendships were of lower quality and one classroom in which in-group friendships were of higher quality. In addition, the overall means were not significantly different from one another in either wave. Therefore, our study does not indicate that in-group friendships are of higher quality than out-group ones, answering our second research question. As we did not find descriptive differences, we did not further investigate this research question in the models. We replicated the results for differences in friendship quality on a restricted sample that included only those students who had both in-and out-group friendships (results can be seen in the appendix, Table A2). In this case, we  still did not find statistically significant differences in friendship quality between in-and out-group friendships.

Descriptive Differences in the Stability of In-and Out-group Friendships
To investigate whether in-group friendships were more stable than out-group friendships, we looked at the proportion of first-wave friendships that still existed at the second wave for both in-and out-group ties, and compared these proportions with each other. Table 3 shows that in 19 classrooms out of 35, a larger proportion of in-group ties than out-group ties survived between the two waves. While the difference was only significant in two cases, the pattern became more obvious when looking at the whole sample. Overall, 62% of all out-group ties were stable over time, as opposed to 68% of all in-group ties. The overall difference was statistically significant. We therefore found evidence that in-group ties are more stable than out-group ones, supporting our hypothesis related to Research Question 3.

Stochastic Actor-Oriented Model Results Investigating Prevalence, Quality and Stability of Friendships
After descriptively assessing the prevalence, quality, and stability of outgroup relationships compared to in-group ones, we explored their prevalence and stabilityin cases where we obtained significant differences between the two types of relationshipsin longitudinal social network models. For this, we further inspected the results of our SAOMs. First, we estimated friendship evolution models that did not differentiate between creation of new ties and keeping existing ties; second, we estimated models in which creation of new ties and stability of existing ties were treated separately. Our models show satisfactory convergence: for all parameters, R-hat ≤ 1.1 and n eff ≥ 20 (for 4 chains). This is in line with standard requirements of convergence for multilevel SAOMs (Ripley et al., 2022, p. 126). Table 4 shows results of two SAOMs (Model A and B) on friendship evolution. Here, we did not distinguish between the creation of new ties and stability of existing ties; instead, the parameters captured both processes. This is in line with the majority of research conducted using SAOMs (see Ripley et al., 2022). Within the evolution model approach, we further estimated two models: In Model A, only the outdegree effect (which served as an intercept) and a same-culture membership variable were included. In Model B, additional variables capturing the network structure as well as whether two students had the same gender and a similar SES were included. In both models, we found a significant positive effect of in-group membership, indicating that students tended to create and maintain friendships with those who belonged to their ethnic in-group. In Model B, the parameter value was smaller than in Model A. This suggests that the control variables added to Model B were partly responsible for the tendency to nominate same-ethnic friends. Overall, the results reported in Table 4 provide evidence that the students in our study were more likely to form and/or maintain in-group friendships.

Distinguishing Between the Creation and Stability of Friendships
Within the creation-and-stability approach, we again estimated two models (Model 1 and Model 2, see Table 5). These were similar to those in Table 4 but additionally distinguished between the creation of new ties and the stability of existing ties. In Model 1, only the outdegree effect (which served as an intercept) and same-group membership were included. In Model 2, we additionally included variables capturing the network structure as well as same gender and a similar proxy for SES when estimating the effect of membership in the same ethnic group. Both Models 1 and 2 revealed significant positive stability tendencies for in-group ties compared to out-group ones. This supported our hypothesis relating to Research Question 3, as in-group ties appeared to be more stable over time.
Interestingly, we did not find significant effects of ethnic background on the creation of new ties in any of the models. In Model 1, we obtained a nonsignificant positive parameter. In Model 2, the results revealed a nonsignificant negative parameter for in-group membership on the creation of new ties. That is, when controlling for the effects of other individual characteristics and the network structure, most importantly transitivity (i.e., creating friendships with friends of friends), which was highly significant in the model, individuals actually had a slight, but non-significant, preference for friends from different ethnic groups.

Discussion
The goal of this study was to gain more detailed insights into differences in friendship processes based on ethnic similarity for children in their last year of primary school. We investigated whom children are friends with in terms of ethnic group membership, what qualities these friendships have, and which friendships are stable over the course of one year. We applied social network analysis in order to account for key network characteristics, distinguished between forming and maintaining friendships, and considered each and every ethnic group in the classroom. The results of the study indicated that students tend to have more ethnic in-group friends (i.e., homophily effect). This friendship homophily effect could partly be attributed to control variables (network effects, gender and SES). Moreover, the overrepresentation of in-group friendships was mostly due to the higher stability of in-group ties, whereas we did not find a significant difference between the formation of new in-group and new out-group friendships. The results showed that once in-group friendships were formed, they were more stable, but did not differ in quality from out-group friendships.

Who is Friends with Whom?
Our first research question centered on the question of who is friends with whom in terms of ethnic group membership. In the evolution models, parameters simultaneously captured both the creation and maintenance of friendships. In these models, we found a significant positive effect, indicating that students formed and/or maintained friendships with classmates from the same ethnicgroup, that is, from either the same minority ethnic group or from the majority group (i.e., Austrian). Descriptively, we also found an overall effect of having more ethnic ingroup friends. However, when modeling the same effect in the creation and stability models, in which friendship formation and stability were separated, the creation effect no longer attained statistical significance and the direction of the effect actually flipped when controlling for network effects, gender and the proxy of SES, but this reversed effect should not be over interpreted, as it was nonsignificant. Nevertheless, it turned out that the effect found in the evolution model was mainly driven by the stability component, which remained significant (and kept its sign) also when including the control variables. In the evolution model, which combined the two effects of creation and stability, the effect of same-ethnic membership was negative and significant, but less significant than the stability effect alone (because it was "diluted" by the positive creation effect). This is an important finding because even articles applying SAOMs rarely differentiate between creation and stability of social ties. In conjunction with previous findings among adolescents, our results from a sample of late childhood going into early adolescence substantiate the argument that ethnic homophily is already present before entering adolescence. However, we found that students were creating new friendships with members of their ethnic out-group, suggesting that they may not have a strong preference for in-group ties in general. Differences were mostly found in the stability of friendships, which may be a result of friendships towards peers from more familiar ethnic backgrounds proving to be easier to maintain in the long term. As the awareness of different cultures is not as present in younger children as in adolescents, it is quite comprehensible that friendship homophily gets stronger with age. Although children are able to recognize and categorize culture or ethnicity at a young age, it is not particularly important to them in late childhood (Verkuyten & Kinket, 1999). They might increasingly focus on differences between different groups and cultures over time as they become more aware of and are exposed to attitudes and behaviors towards migration and different ethnic groups in their environment, for example through their parents, teachers, the internet and other media.
We must further keep in mind that the results of this study were based on country of origin as the variable defining in-or out-group membership and we treated every country of origin as being equally different from another. We did not look at the results separately for any specific ethnic group and did not compare specific groups with each other. Some ethnic groups may be closer to each other in terms of ethnic similarity, but we were trying to capture whether the mere country of origin is similar enough to produce friendship homophily. When we took a more detailed look into different groups by separating out-group ties into (1) ties between different minority group members (e.g., Turkish-Spanish ties), (2) ties from majority to minority members (e.g., Austrian-Spanish ties) and (3) ties from minority to majority members (e.g., Spanish-Austrian ties), and in-group ties into (1) samemajority ties (Austrian-Austrian ties) and (2) same-minority ties (e.g. Spanish-Spanish ties) in our robustness-check, we gained confidence that although there are some differences between different same-group ties, all in-group ties are still more likely to be present than all out-group ties. We were interested to see whether a specific in-group attribute, in our study the mere country of origin of the child or the parents, would produce friendship homophily. The concept of homophily, that "birds of a feather flock together" captures that people form relationships with others who are similar to them and applies to many attributes such as gender, religion, age, occupation and education (McPherson et al., 2001). From an evolutionary perspective, it made sense to choose similar people as they could have been seen as more trustworthy than dissimilar people. Apart from this mere preference of similarity, there are many contextual factors that lead to a preference for in-group members. In our study we found evidence that being born or having parents being born in a specific country increases the likelihood of being friends with someone from that country and we identified network characteristics and stability as potential factors for that overrepresentation of in-group friends. However, there are various other factors beyond the scope of our study that account for the preference for in-group friends (contextual variables, norms, more contact with the in-group).

Friendship Quality of In-and Out-group Friendships
After identifying friendship patterns within classes, we aimed to achieve a better understanding of these friendships by investigating their quality. Our central questions of interest were whether in-and out-group friendships differ in their quality and stability. A possible explanation for the overrepresentation of in-group friendships is related to the assumption that such friendships are "stronger" or "deeper", as in-group friends may share similar experiences and face similar challenges, making it easier for them to connect. Previous studies did not yield consistent results regarding the quality of in-group friendships as compared to out-group friendships, as they found either no differences (e.g., Reinders & Mangold, 2005) or differences only with respect to certain aspects (e.g., Strohmeier et al., 2006). Our results add a further piece of evidence, indicating that there may in fact be no differences in quality between sameand cross-ethnic friendships, at least for this age group and at this stage in school. Thus, our study's findings contradict the argument that students prefer in-group friendships because they are more profound. Nevertheless, one reason for the lack of differences found could simply lie in the way we assessed friendships, namely by asking about "best" friends. It is possible that once someone has reached the status of "best friend", a certain level of friendship quality has been achieved that does not allow for much variance.

Friendship Stability of In-and Out-group Friendships
While we did not find differences in terms of quality, once in-group friendships were formed, they persisted over a longer period of time. This is in line with previous research in early adolescence (Jugert et al., 2013) and adolescence (Schneider et al., 2007). Hence, although in-group friendships were not necessarily of higher quality in our study, they were more stable. Indeed, our findings emphasize the role of stability as a central component of ethnic homophily. When we separated the creation of in-group friendships from their stability, we found more in-group friendships because more of them "survived". We cannot confidently conclude whether this effect is specific to our age group, because to the best of our knowledge, no other study has separated maintenance and stability in a network analysis of ethnic in-and out-group friendships. One possible explanation for our findings for this particular age group relates to parental support. In primary school, parents still have a profound influence on their children, and parents' attitudes and behavior affect their children's attitudes toward out-group members (Hughes et al., 2006). Simultaneously, in this age group, parents also create and offer the structural environment and resources that can facilitate or hinder the maintenance of friendships, for example by driving children around, providing a place to meet, and organizing activities. As contact outside of school has been shown to positively influence the stability of in-school friendships (Lessard et al., 2019), it is thus likely that among children, parents' encouragement of ethnic in-group friendships influences their stability. Accordingly, even when children form out-group friendships in school, the maintenance of such friendships might be influenced by their parents' (lack of) encouragement.

Social Network Effects
The friendships that children build in the classroom are embedded in networks of friends. Our results illuminated the importance of considering network effects when studying ethnic in-and out-group friendships. Using social network analysis, we were able to consider key network characteristics for the formation and maintenance of in-and out-group friendships. In both the evolution and the creation and stability approach, we set up two models, one that controlled for network characteristics, gender and socio-economic status and one that did not. Adding these control variables decreased the parameter value signifying the tendency to nominate friends from one's own ethnic group, suggesting that the control variables are partly responsible for the tendency to nominate in-group friends. Despite using a one-step approach, which made it hard to pinpoint which variables were responsible for the parameter sizes diminishing or changing directions, our findings point to the role of network effects in this regard. It seemed unlikely that SES was an alternative explanation for the culture effect, because the SES effects were not significant. The same applies to gender, because gender and ethnic membership were found to be statistically independent from each other, and gender would need to be correlated with culture in order to "explain the effect away". Of the structural factors, there are theoretical and empirical reasons to believe that transitivity, which was positive and highly significant in our models, should be the most important such factor operating in the background. Transitivity captures the tendency to become friends with friends of friends, and, as explained earlier, it could strengthen segregation even without additional sameculture preferences. This implies that even if students would be happy to be friends with students from other groups, the group structure makes it more likely that they nevertheless end up becoming friends with peers from their own group. Understanding how the network can influence the development of in-and outgroup friendships is essential as a large amount of research points towards the beneficial effects of out-group friendships in promoting positive intergroup relations. However, it would be too short-sighted to promote and put the focus on out-group friendships only without considering other factors. On the one hand, ingroup friendships fill important needs and are also important for minority students' adaptive development. Focusing on promoting out-group friendships only or in an extreme case, hindering in-group friendships, might deprive minority students of support and resources. On the other hand, the positive effect of outgroup friendships can diminish or even turn into the opposite depending on who the numerical majority in the school is and how the overall norms towards outgroup friendships are (Killen et al., 2021).

Limitations, Future Directions and Conclusion
This study makes a valuable contribution to the existing literature on ethnic in-and out-group friendship by offering new insights into their formation, quality and stability. However, as with any empirical study, it does not come without its limitations. First, although this study's findings provide important information on the formation of friendship networks, we were not able to study in detail the psychological mechanisms underlying why in-group friendships arise and why they are more stable. Despite identifying promising tendencies (i.e., network effects; stability) that might explain the overrepresentation of ethnic in-group friendships, the exact mechanisms that play a role in the formation of these friendships among this particular age group still need to be scrutinized in future work. We did not consider broader contextual factors that influence the formation, quality and stability of friendships, such as the overall diversity of schools or intergroup norms among peers or teachers (Tropp et al., 2016;McGlothlin & Killen, 2010). Further studies should take the promising yet relatively seldom traveled path of investigating network effects, while also looking for further factors that explain why same-ethnic friendships are so much more stable (see e.g., Jugert et al., 2013).
Second, we use the term "ethnic group" throughout this article to describe the in-and out-groups. However, we want to draw attention to the fact that we do so due to the current lack of a better-suited term. There is not only one definition of culture; moreover, the term culture is often used interchangeably with ethnicity and extends beyond national country borders. We actually examined children's and parents' country of birth, which is solely a proxy for culture. Furthermore, it should be kept in mind that one's self-ascribed group membership and others' perception of one's culture or ethnicity can differ and influence the choice of friends (Boda, 2019). Future studies should use more elaborate assessments of culture or ethnicity and investigate self-and otherascribed group memberships with respect to in-and out-group friendships.
Third, we restrained friendship nominations to friends in the classroom, which limits our findings to friendships formed with classmates. Although most friendships are formed in school, extracurricular activities (Schaefer et al., 2011) and the neighborhood (Edling & Rydgren, 2012) are also important areas for friendship formation. As many European neighborhoods are ethnically segregated (Šimon et al., 2021), friendship networks outside of school and their mechanisms might look and function differently than those in schools. Studying friendships outside of school is quite rare and should thus be considered in future studies. In addition, we restrained friendship nominations to a maximum of five due to practical reasons (as mentioned in the methods section, see p.10 in this manuscript). It needs to be mentioned that the restriction of nominations violates the RSiena assumption that actors in a network can choose their nomination ties freely which potentially leads to biased network indicators. However, we are confident that the restriction did not induce any major bias in our analyses, given that our SAOM estimates for structural parameters are substantively similar to those in other studiesboth to those with friendship nominations limited to five (Smith & Schneider, 2000;Kruse & Kroneberg, 2019) or ten (Leszczensky & Pink, 2015), and to those without such limitations (e.g., Block &Grund, 2014;Grund & Densley, 2015;Boda & Néray, 2015;Gremmen et al., 2018).
Another shortcoming of our study related to the measurements chosen to measure friendships quality and SES. The measure of SES can only be seen as a proxy for SES, as it reflects only one specific aspect of SES, namely family wealth (see e.g., Kehoe & O'Hare, 2010;Boyce et al., 2006). SES is a multidimensional construct, but an important factor in friendship formations as SES is confounded with immigration status and students tend to be friends with others from a similar socio-economic background (McPherson et al., 2001). Accordingly, SES should be considered when studying friendships. We further set out to investigate differences in friendship quality and did not find any; however, the measure of friendship quality may partly be responsible for this. We relied on items that have successfully been used before to study friendship quality, but friendship quality can contain many different aspects (see e.g., Berndt, 2002). We measured only three of these many aspects, with only one or two items each. We were thus not able to account for the wide range of potential friendship quality aspects. It could be that we did not capture the most relevant aspects along which friendship quality differs between in-and out-group friendships. Future studies should therefore integrate more extensive measures of SES as well as of friendship quality to reach more confident conclusions.
In conclusion, despite these aforementioned limitations, this study contributes to providing a clearer picture and better understanding of ethnic in-and out-group friendships. We explored critical characteristics of these friendships in late childhood to early adolescence, such as friendship quality and stability. Our research breaks new ground by illustrating the importance of considering network effects and disentangling the stability from the formation of ethnic inand out-group friends.  p-value of difference in relation to majority dyads QAPs with more nomination types. Only classes with at least two students from at least three origin groups are included (so that each of these nomination types is possible). Statistically significant coefficients at p ≤ .05 are in boldface.   participation and inclusion, and in developing new learning methods and processes in primary and secondary schools.

Appendix
Lisa Bardach is a junior professor at the Hector Research Institute of Education Sciences and Psychology at the University of Tuebingen. Her main research interests include students' and teachers' personal motivational orientations and perceptions of contextual motivational features, emotions and self-regulated learning.
Mike Lehofer focused on his research topics related to inclusion and diversity as a researcher at the University of Graz, University of Vienna and the University of Wuppertal, where he worked on a project on attitudes of students, parents and teachers towards students with disabilities.
Marko Lüftenegger is associate professor for educational and developmental psychology at the Centre for Teacher Education and the Faculty of Psychology at the University of Vienna. His main research interest lies in individual and contextual factors related to students' and teachers' noncognitive attributes.