* Bajari et al. (2010) Bajari, P., H. Hong, J. Krainer, and D. Nekipelov (2010): “Estimating static models of strategic interactions,” _Journal of Business & Economic Statistics_, 28, 469–482.
  * Ballester et al. (2006) Ballester, C., A. Calvó-Armengol, and Y. Zenou (2006): “Who’s who in networks. Wanted: The key player,” _Econometrica_ , 74, 1403–1417.
  * Beugnot et al. (2019) Beugnot, J., B. Fortin, G. Lacroix, and M. C. Villeval (2019): “Gender and peer effects on performance in social networks,” _European Economic Review_ , 113, 207–224.
  * Blume et al. (2015) Blume, L. E., W. A. Brock, S. N. Durlauf, and R. Jayaraman (2015): “Linear social interactions models,” _Journal of Political Economy_ , 123, 444–496.
  * Boucher (2016) Boucher, V. (2016): “Conformism and self-selection in social networks,” _Journal of Public Economics_ , 136, 30–44.
  * Boucher and Bramoullé (2020) Boucher, V. and Y. Bramoullé (2020): “Binary Outcomes and Linear Interactions,” Tech. rep., Aix-Marseille School of Economics, France.
  * Boucher et al. (2022) Boucher, V., F. A. Dedewanou, and A. Dufays (2022): “Peer-induced beliefs regarding college participation,” _Economics of Education Review_ , 90, 102307.
  * Boucher and Fortin (2016) Boucher, V. and B. Fortin (2016): “Some challenges in the empirics of the effects of networks,” _The Oxford Handbook on the Economics of Networks_ , 277–302.
  * Boucher and Houndetoungan (2022) Boucher, V. and A. Houndetoungan (2022): “Estimating peer effects using partial network data,” Tech. rep., Centre de recherche sur les risques les enjeux économiques et les politiques.
  * Boucher et al. (2024) Boucher, V., M. Rendall, P. Ushchev, and Y. Zenou (2024): “Toward a general theory of peer effects,” _Econometrica_ , 92, 543–565.
  * Bramoullé et al. (2009) Bramoullé, Y., H. Djebbari, and B. Fortin (2009): “Identification of peer effects through social networks,” _Journal of Econometrics_ , 150, 41–55.
  * Bramoullé et al. (2020) ——— (2020): “Peer effects in networks: A survey,” _Annual Review of Economics_ , 12, 603–629.
  * Brock and Durlauf (2001) Brock, W. A. and S. N. Durlauf (2001): “Discrete choice with social interactions,” _The Review of Economic Studies_ , 68, 235–260.
  * Brock and Durlauf (2002) ——— (2002): “A multinomial-choice model of neighborhood effects,” _American Economic Review_ , 92, 298–303.
  * Brock and Durlauf (2007) ——— (2007): “Identification of binary choice models with social interactions,” _Journal of Econometrics_ , 140, 52–75.
  * Calvó-Armengol et al. (2009) Calvó-Armengol, A., E. Patacchini, and Y. Zenou (2009): “Peer effects and social networks in education,” _The Review of Economic Studies_ , 76, 1239–1267.
  * Comola et al. (2022) Comola, M., R. Dieye, and B. Fortin (2022): “Heterogeneous peer effects and gender-based interventions for teenage obesity,” Tech. rep., CIRANO.
  * De Paula (2013) De Paula, Á. (2013): “Econometric analysis of games with multiple equilibria,” _Annual Review of Economics_ , 5, 107–131.
  * De Paula (2017) ——— (2017): “Econometrics of network models,” in _Advances in economics and econometrics: Theory and applications, eleventh world congress_ , Cambridge University Press Cambridge, 268–323.
  * De Paula (2020) ——— (2020): “Econometric models of network formation,” _Annual Review of Economics_ , 12, 775–799.
  * Dzemski (2019) Dzemski, A. (2019): “An empirical model of dyadic link formation in a network with unobserved heterogeneity,” _Review of Economics and Statistics_ , 101, 763–776.
  * Fortin and Yazbeck (2015) Fortin, B. and M. Yazbeck (2015): “Peer effects, fast food consumption and adolescent weight gain,” _Journal of Health Economics_ , 42, 125–138.
  * Fujimoto and Valente (2013) Fujimoto, K. and T. W. Valente (2013): “Alcohol peer influence of participating in organized school activities: a network approach.” _Health Psychology_ , 32, 1084.
  * Goldsmith-Pinkham and Imbens (2013) Goldsmith-Pinkham, P. and G. W. Imbens (2013): “Social networks and the identification of peer effects,” _Journal of Business & Economic Statistics_, 31, 253–264.
  * Graham (2017) Graham, B. S. (2017): “An econometric model of network formation with degree heterogeneity,” _Econometrica_ , 85, 1033–1063.
  * Guerra and Mohnen (2020) Guerra, J.-A. and M. Mohnen (2020): “Multinomial choice with social interactions: occupations in Victorian London,” _Review of Economics and Statistics_ , 1–44.
  * Hastie (2017) Hastie, T. J. (2017): “Generalized additive models,” in _Statistical models in S_ , Routledge, 249–307.
  * Houndetoungan and Maoude (2024) Houndetoungan, A. and A. H. Maoude (2024): “Inference for Two-Stage Extremum Estimators,” _arXiv preprint arXiv:2402.05030_.
  * Hsieh and Lee (2016) Hsieh, C.-S. and L. F. Lee (2016): “A social interactions model with endogenous friendship formation and selectivity,” _Journal of Applied Econometrics_ , 31, 301–319.
  * Isihara (2013) Isihara, A. (2013): _Statistical physics_ , Academic Press.
  * Jochmans (2023) Jochmans, K. (2023): “Peer effects and endogenous social interactions,” _Journal of Econometrics_ , 235, 1203–1214.
  * Johnsson and Moon (2021) Johnsson, I. and H. R. Moon (2021): “Estimation of peer effects in endogenous social networks: control function approach,” _Review of Economics and Statistics_ , 103, 328–345.
  * Kasahara and Shimotsu (2012) Kasahara, H. and K. Shimotsu (2012): “Sequential estimation of structural models with a fixed point constraint,” _Econometrica_ , 80, 2303–2319.
  * Lee et al. (2020) Lee, C. G., J. Kwon, H. Sung, I. Oh, O. Kim, J. Kang, and J.-W. Park (2020): “The effect of physically or non-physically forced sexual assault on trajectories of sport participation from adolescence through young adulthood,” _Archives of Public Health_ , 78, 1–10.
  * Lee (2004) Lee, L.-F. (2004): “Asymptotic distributions of quasi-maximum likelihood estimators for spatial autoregressive models,” _Econometrica_ , 72, 1899–1925.
  * Lee et al. (2014) Lee, L.-f., J. Li, and X. Lin (2014): “Binary choice models with social network under heterogeneous rational expectations,” _Review of Economics and Statistics_ , 96, 402–417.
  * Lee et al. (2021) Lee, L.-F., X. Liu, E. Patacchini, and Y. Zenou (2021): “Who is the key player? A network analysis of juvenile delinquency,” _Journal of Business & Economic Statistics_, 39, 849–857.
  * Li and Lee (2009) Li, J. and L.-f. Lee (2009): “Binary choice under social interactions: an empirical study with and without subjective data on expectations,” _Journal of Applied Econometrics_ , 24, 257–281.
  * Lin and Hu (2024) Lin, Z. and Y. Hu (2024): “Binary choice with misclassification and social interactions, with an application to peer effects in attitude,” _Journal of Econometrics_ , 238, 105551.
  * Lin and Xu (2017) Lin, Z. and H. Xu (2017): “Estimation of social-influence-dependent peer pressure in a large network game,” _The Econometrics Journal_ , 20, S86–S102.
  * Liu (2019) Liu, X. (2019): “Simultaneous equations with binary outcomes and social interactions,” _Econometric Reviews_ , 38, 921–937.
  * Liu et al. (2014) Liu, X., E. Patacchini, and Y. Zenou (2014): “Endogenous peer effects: local aggregate or local average?” _Journal of Economic Behavior & Organization_, 103, 39–59.
  * Liu and Zhou (2017) Liu, X. and J. Zhou (2017): “A social interaction model with ordered choices,” _Economics Letters_ , 161, 86–89.
  * Manski (1988) Manski, C. F. (1988): “Identification of binary response models,” _Journal of the American Statistical Association_ , 83, 729–738.
  * Manski (1993) ——— (1993): “Identification of endogenous social effects: The reflection problem,” _The Review of Economic Studies_ , 60, 531–542.
  * McNeal Jr (1999) McNeal Jr, R. B. (1999): “Participation in high school extracurricular activities: Investigating school effects,” _Social Science Quarterly_ , 291–309.
  * McPherson et al. (2001) McPherson, M., L. Smith-Lovin, and J. M. Cook (2001): “Birds of a feather: Homophily in social networks,” _Annual Review of Sociology_ , 27, 415–444.
  * Murota (1998) Murota, K. (1998): “Discrete convex analysis,” _Mathematical Programming_ , 83, 313–371.
  * Newey and McFadden (1994) Newey, W. K. and D. McFadden (1994): “Large sample estimation and hypothesis testing,” _Handbook of Econometrics_ , 4, 2111–2245.
  * Newton et al. (2018) Newton, N. J., J. Pladevall-Guyer, R. Gonzalez, and J. Smith (2018): “Activity engagement and activity-related experiences: The role of personality,” _The Journals of Gerontology: Series B_ , 73, 1480–1490.
  * Osborne and Rubinstein (1994) Osborne, M. J. and A. Rubinstein (1994): _A course in game theory_ , MIT Press.
  * Patacchini and Zenou (2012) Patacchini, E. and Y. Zenou (2012): “Juvenile delinquency and conformism,” _The Journal of Law, Economics, & Organization_, 28, 1–31.
  * Peng (2019) Peng, S. (2019): “Heterogeneous endogenous effects in networks,” _arXiv preprint arXiv:1908.00663_.
  * Soetevent and Kooreman (2007) Soetevent, A. R. and P. Kooreman (2007): “A discrete-choice model with social interactions: with an application to high school teen behavior,” _Journal of Applied Econometrics_ , 22, 599–624.
  * Van der Vaart (2000) Van der Vaart, A. W. (2000): _Asymptotic statistics_ , vol. 3, Cambridge University Press.
  * Wan and Xu (2014) Wan, Y. and H. Xu (2014): “Semiparametric identification of binary decision games of incomplete information with correlated private signals,” _Journal of Econometrics_ , 182, 235–246.
  * Xu (2018) Xu, H. (2018): “Social interactions in large networks: A game theoretic approach,” _International Economic Review_ , 59, 257–284.
  * Xu and Lee (2015) Xu, X. and L.-f. Lee (2015): “Maximum likelihood estimation of a spatial autoregressive Tobit model,” _Journal of Econometrics_ , 188, 264–280.
  * Yan et al. (2019) Yan, T., B. Jiang, S. E. Fienberg, and C. Leng (2019): “Statistical inference in a directed network model with covariates,” _Journal of the American Statistical Association_ , 114, 857–868.
  * Yang and Lee (2017) Yang, C. and L.-f. Lee (2017): “Social interactions under incomplete information with heterogeneous expectations,” _Journal of Econometrics_ , 198, 65–83.

Supplemental Appendix for "Count Data Models with Heterogeneous Peer Effects"

##  Appendix B Online Appendix

###  B.1 Identification of the Distribution of Agents’ Private Characteristics

This section delves into the identifiability of the distribution function of
agents’ private characteristics $F_{\varepsilon}$. I impose the following
assumptions.

######  Assumption B.1.

There is a variable $x_{i,\hat{\kappa}}$ in $\boldsymbol{x}_{i}$ taking any
value in $\mathbb{R}$ given every value of
$\boldsymbol{x}_{i,-\hat{\kappa}}=(x_{i,1},\dots,\break
x_{i,\hat{\kappa}-1},x_{i,\hat{\kappa}+1},\dots,x_{i,K})^{\prime}$, with
$\beta_{1,\hat{\kappa}}\beta_{2,\hat{\kappa}}\geq 0$ and
$\beta_{1,\hat{\kappa}}\neq 0$, where $\beta_{1,\hat{\kappa}}$ is the
coefficient of $x_{i,\hat{\kappa}}$ and $\beta_{2,\hat{\kappa}}$ is the
coefficient of $\bar{x}_{i,\hat{\kappa}}$, the contextual variable associated
with $x_{i,\hat{\kappa}}$.

######  Assumption B.2.

The location and scale parameters of $F_{\varepsilon}$ are set fixed such that
$\mathbb{E}(\varepsilon_{i})=0$ and $\mathbb{V}(\varepsilon_{i})=1$.

Assumption B.1 adapts Condition X3 of Manski (1988) to my framework. It
implies that
$\beta_{1,\hat{\kappa}}x_{i,\hat{\kappa}}+\beta_{2,\hat{\kappa}}\bar{x}_{i,\hat{\kappa}}$
can take any value in $\mathbb{R}$ given $\boldsymbol{x}_{i,-\hat{\kappa}}$.
Assumption B.2 is a standard restriction imposed in discrete models. As the
intercept in $\mathbf{X}$ can absorb the mean of $\varepsilon_{i}$ the
assumption of zero mean for $\varepsilon_{i}$ is inconsequential.
Additionally, imposing a unit variance for $\varepsilon_{i}$ is not overly
restrictive. The model remains unchanged when both $\varepsilon_{i}$ and
$\boldsymbol{\theta}$ are multiplied by any positive scalar.

######  Proposition B.1.

Under Assumptions 2.1–3.2, B.1, and B.2,
$(\boldsymbol{\theta},\leavevmode\nobreak\ F_{\varepsilon})$ is identified.

###### Proof.

Assume that $(\boldsymbol{\theta},\leavevmode\nobreak\ F_{\varepsilon})$ and
$(\tilde{\boldsymbol{\theta}},\leavevmode\nobreak\ \tilde{F}_{\varepsilon})$
are observationally equivalent. Following Definition 3.1, this means that
$p(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})=\tilde{p}(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$, where $p(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$ and
$\tilde{p}(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$ are the distributions of $\mathbf{y}_{s}$ conditional on
$\mathcal{W}_{s}$ and $\mathbf{Z}_{s}$ at
$(\boldsymbol{\theta},\leavevmode\nobreak\ F_{\varepsilon})$ and
$(\tilde{\boldsymbol{\theta}},\leavevmode\nobreak\ \tilde{F}_{\varepsilon})$,
respectively. Both distributions also yield the same expected outcome
$\mathbb{E}(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$.

The condition $p(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})=\tilde{p}(\mathbf{y}_{s}|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$ implies that $p_{i}(0|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})=\tilde{p}_{i}(0|\mathcal{W}_{s},\leavevmode\nobreak\
\mathbf{Z}_{s})$ for all $i$, where
$p_{i}(.|\mathcal{W}_{s},\leavevmode\nobreak\ \mathbf{Z}_{s})$ and
$\tilde{p}_{i}(.|\mathcal{W}_{s},\leavevmode\nobreak\ \mathbf{Z}_{s})$ are the
conditional probability mass functions of $y_{i}$ given $\mathcal{W}_{s}$ and
$\mathbf{Z}_{s}$ at $\boldsymbol{\theta}$ and $\tilde{\boldsymbol{\theta}}$,
respectively. Thus,
$F_{\varepsilon}\big{(}\bar{\mathcal{Y}}_{i}\boldsymbol{\alpha}+\boldsymbol{z}_{i}^{\prime}\boldsymbol{\beta}\big{)}=\tilde{F}_{\varepsilon}\big{(}\bar{\mathcal{Y}}_{i}\tilde{\boldsymbol{\alpha}}+\boldsymbol{z}_{i}^{\prime}\tilde{\boldsymbol{\beta}}\big{)}$.
As
$\frac{1}{n}\sum_{i=1}^{n}\tilde{\boldsymbol{z}}_{i}^{\prime}\tilde{\boldsymbol{z}}_{i}$
is a full-rank matrix and $F_{\varepsilon}(0)=\tilde{F}_{\varepsilon}(0)=0.5$,
$\boldsymbol{\theta}$ can be identified relative to
$\tilde{\boldsymbol{\theta}}$. This is a direct implication of Proposition 2
of Manski (1988). Indeed, assume that
$(\bar{\tau}\boldsymbol{\alpha},\leavevmode\nobreak\
\bar{\tau}\boldsymbol{\beta})\neq(\tilde{\boldsymbol{\alpha}},\leavevmode\nobreak\
\tilde{\boldsymbol{\beta}})$ for any $\bar{\tau}>0$. Assumption B.1 implies
that the following condition holds for some agents in sufficiently large
samples:

$\bar{\mathcal{Y}}_{i}\boldsymbol{\alpha}+\boldsymbol{z}_{i}^{\prime}\boldsymbol{\beta}<0\leq\bar{\mathcal{Y}}_{i}\tilde{\boldsymbol{\alpha}}+\boldsymbol{z}_{i}^{\prime}\tilde{\boldsymbol{\beta}}\quad\text{or}\quad\bar{\mathcal{Y}}_{i}\tilde{\boldsymbol{\alpha}}+\boldsymbol{z}_{i}^{\prime}\tilde{\boldsymbol{\beta}}<0\leq\bar{\mathcal{Y}}_{i}\boldsymbol{\alpha}+\boldsymbol{z}_{i}^{\prime}\boldsymbol{\beta}.$
(B.4)

This is because
$\bar{\mathcal{Y}}_{i}\boldsymbol{\alpha}+\boldsymbol{z}_{i}^{\prime}\boldsymbol{\beta}$
can take any value in $\mathbb{R}$ (by Assumption B.1) and is not proportional
to
$\bar{\mathcal{Y}}_{i}\tilde{\boldsymbol{\alpha}}+\boldsymbol{z}_{i}^{\prime}\tilde{\boldsymbol{\beta}}$.
However, since $F_{\varepsilon}(0)=\tilde{F}_{\varepsilon}(0)=0.5$ and
$F_{\varepsilon}$ is strictly increasing (Assumption 3.2), Equation (B.4)
implies that
$F_{\varepsilon}\big{(}\bar{\mathcal{Y}}_{i}\boldsymbol{\alpha}+\boldsymbol{z}_{i}^{\prime}\boldsymbol{\beta}\big{)}\neq\tilde{F}_{\varepsilon}\big{(}\bar{\mathcal{Y}}_{i}\tilde{\boldsymbol{\alpha}}+\boldsymbol{z}_{i}^{\prime}\tilde{\boldsymbol{\beta}}\big{)}$.
Consequently, the condition
$(\bar{\tau}\boldsymbol{\alpha},\leavevmode\nobreak\
\bar{\tau}\boldsymbol{\beta})\neq(\tilde{\boldsymbol{\alpha}},\leavevmode\nobreak\
\tilde{\boldsymbol{\beta}})$ for any $\bar{\tau}>0$ cannot hold. There exists
$\bar{\tau}>0$ such that $(\bar{\tau}\boldsymbol{\alpha},\leavevmode\nobreak\
\bar{\tau}\boldsymbol{\beta})=(\tilde{\boldsymbol{\alpha}},\leavevmode\nobreak\
\tilde{\boldsymbol{\beta}})$, which means that
$F_{\varepsilon}(u)=\tilde{F}_{\varepsilon}(\bar{\tau}u)$ for all
$u\in\mathbb{R}$. As a result, $F_{\varepsilon}$ can be identified relative to
$\tilde{F}_{\varepsilon}$ up to scale. As the scale parameter is set to one,
it follows that $\tau=1$, $(\boldsymbol{\alpha},\leavevmode\nobreak\
\boldsymbol{\beta})=(\tilde{\boldsymbol{\alpha}},\leavevmode\nobreak\
\tilde{\boldsymbol{\beta}})$, and $F_{\varepsilon}=\tilde{F}_{\varepsilon}$.
Hence, $(\boldsymbol{\alpha},\leavevmode\nobreak\
\boldsymbol{\beta},\leavevmode\nobreak\ F_{\varepsilon})$ is identified. The
threshold parameters are identified as in Proposition 3.1. ∎

###  B.2 Asymptotic Variance of the NPL Estimator

Let $\mathbf{y}^{e}=\mathbb{E}(\mathbf{y}|\mathcal{W},\leavevmode\nobreak\
\mathbf{Z})$,
$\tilde{\boldsymbol{z}}_{i}=(\bar{\mathcal{Y}}_{i},\leavevmode\nobreak\
\boldsymbol{z}_{i}^{\prime})^{\prime}$, and
$\boldsymbol{\Gamma}=(\boldsymbol{\alpha}^{\prime},\leavevmode\nobreak\
\boldsymbol{\beta}^{\prime})^{\prime}$. Let also
$f_{i,r}=f\left(\tilde{\boldsymbol{z}}_{i}^{\prime}\boldsymbol{\Gamma}-\gamma_{g_{i}}(r)\right)$,
$F_{i,r}=F_{\varepsilon}\left(\tilde{\boldsymbol{z}}_{i}^{\prime}\boldsymbol{\Gamma}-\gamma_{g_{i}}(r)\right)$,
$\Delta f_{i,r}=f_{i,r}-f_{i,r-1}$, and $\Delta F_{i,r}=F_{i,r}-F_{i,r-1}$ for
any $r\geq 1$, evaluated at the true value $\boldsymbol{\theta}_{0}$. I denote
by $\partial_{\boldsymbol{u}}$ the partial derivative with respect to (w.r.t)
$\boldsymbol{u}$ and by $\partial_{\boldsymbol{u}\boldsymbol{v}^{\prime}}$ the
second-order cross partial derivatives w.r.t
$\boldsymbol{u}\boldsymbol{v}^{\prime}$. For all $g,\leavevmode\nobreak\
g^{\prime}\in G$, $r=2,\leavevmode\nobreak\ \dots,\leavevmode\nobreak\ R$, and
$r^{\prime}=r+1,\leavevmode\nobreak\ \dots,\leavevmode\nobreak\ R$:

$\displaystyle\partial_{\boldsymbol{\Gamma}}\mathcal{L}_{n}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e})=\sum_{i=1}^{n}\sum_{t=0}^{R}d_{it}\dfrac{\Delta
f_{i,t+1}}{\Delta F_{i,t+1}}\tilde{\boldsymbol{z}}_{i}$ and
$\displaystyle\partial_{\gamma_{g}(r)}\mathcal{L}_{n}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e})=\sum_{i\in\mathcal{G}_{g}}\dfrac{d_{ir}f_{i,r}}{\Delta
F_{i,r+1}}-\sum_{i\in\mathcal{G}_{g}}\dfrac{d_{i(r-1)}f_{i,r}}{\Delta
F_{i,r}}$.

I define the following scalar:
$\displaystyle\Sigma_{11,i}=\sum_{t=0}^{R}\dfrac{f_{i,t+1}^{2}-2f_{i,t}f_{i,t+1}+f_{i,t}^{2}}{\Delta
F_{i,t+1}}$,
$\displaystyle\Sigma_{12,r,i}=\dfrac{f_{i,r}(f_{i,r+1}-f_{i,r})}{\Delta
F_{i,r+1}}-\dfrac{f_{i,r}(f_{i,r}-f_{i,r-1})}{\Delta F_{i,r}}$,
$\displaystyle\Sigma_{22,r,i}=\dfrac{f_{i,r}^{2}}{\Delta
F_{i,r}}+\dfrac{f_{i,r}^{2}}{\Delta F_{i,r+1}}$,
$\displaystyle\Sigma_{22,rr^{\prime},i}=-\dfrac{f_{i,r}f_{i,r+1}}{\Delta
F_{i,r+1}}$ if $r^{\prime}=r+1$, and $\Sigma_{22,rr^{\prime},i}=0$ if
$r^{\prime}>r+1$.

Let
$\boldsymbol{\Sigma}_{n,i}=\mathbb{V}(\partial_{\boldsymbol{\theta}}\mathcal{L}_{n,i}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e}_{s})|\boldsymbol{\chi}_{n})$. We have:

$\boldsymbol{\Sigma}_{n,i}=-\begin{pmatrix}\Sigma_{11,i}\boldsymbol{z}_{i}\boldsymbol{z}_{i}^{\prime}&\boldsymbol{z}_{i}(\mathcal{H}_{i}\otimes\boldsymbol{\Sigma}_{12,i})\\\
(\mathcal{H}_{i}\otimes\boldsymbol{\Sigma}_{12,i})^{\prime}\boldsymbol{z}_{i}^{\prime}&\mathcal{H}_{i}\otimes\boldsymbol{\Sigma}_{22,i},\end{pmatrix},\leavevmode\nobreak\
\text{where}\leavevmode\nobreak\
\boldsymbol{\Sigma}_{22,i}=\begin{pmatrix}\Sigma_{22,2,i}&\Sigma_{22,23,i}&\ldots&\Sigma_{22,2R,i}\\\
\Sigma_{22,23,i}&\Sigma_{22,3,i}&\ldots&\Sigma_{22,3R,i}\\\
\vdots&\vdots&\ddots&\vdots\\\
\Sigma_{22,2R,i}&\Sigma_{22,3R,i}&\ldots&\Sigma_{22,R,i}.\end{pmatrix},$

$\boldsymbol{\Sigma}_{12,i}=(\Sigma_{12,2,i},\leavevmode\nobreak\
\dots,\leavevmode\nobreak\ \Sigma_{12,R,i})$,
$\mathcal{H}_{i}=(\mathbbm{1}\\{g_{i}=1\\},\leavevmode\nobreak\
\dots,\leavevmode\nobreak\ \mathbbm{1}\\{g_{i}=M\\})$, and $\otimes$
represents the Kronecker product. Let
$\boldsymbol{\Sigma}_{n}=\displaystyle\frac{1}{n}\sum_{i=1}^{n}\boldsymbol{\Sigma}_{n,i}$.
By the law of large numbers (LLN),
$\boldsymbol{\Sigma}_{0}=\operatorname{plim}\boldsymbol{\Sigma}_{n}$, where
$\operatorname{plim}$ is the limit in probability as $n$ grows to infinity.

Besides,
$\mathbf{H}_{1,n}=\partial_{\boldsymbol{\theta}\boldsymbol{\theta}^{\prime}}\mathcal{L}_{n}(\dot{\boldsymbol{\theta}}_{n},\leavevmode\nobreak\
\dot{\mathbf{y}}^{e})$ and
$\mathbf{H}_{2,n}=\partial_{\boldsymbol{\theta}\boldsymbol{u}^{\prime}}\mathcal{L}_{n}(\dot{\boldsymbol{\theta}}_{n},\leavevmode\nobreak\
\dot{\mathbf{y}}^{e})\partial_{\boldsymbol{\theta}^{\prime}}\dot{\mathbf{y}}^{e\prime}$
for some $\dot{\boldsymbol{\theta}}_{n}$ lying between
$\hat{\boldsymbol{\theta}}_{n}$ and $\boldsymbol{\theta}_{0}$ such that
$\dot{\mathbf{y}}^{e}=\mathbf{L}(\dot{\boldsymbol{\theta}}_{n},\leavevmode\nobreak\
\dot{\mathbf{y}}^{e})$. As $\hat{\boldsymbol{\theta}}_{n}$ converges to
$\boldsymbol{\theta}_{0}$, by the LLN, we have
$\mathbf{H}_{1,0}=\operatorname{plim}\mathbf{H}_{1,n}$ and
$\mathbf{H}_{2,0}=\operatorname{plim}\mathbf{H}_{2,n}$. One can verify that
$\mathbb{E}(\partial_{\boldsymbol{\theta}\boldsymbol{\theta}^{\prime}}\mathcal{L}_{i,n}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e}_{s})|\boldsymbol{\chi}_{n})=-\boldsymbol{\Sigma}_{n,i}$. Thus,
$\mathbf{H}_{1,0}=-\boldsymbol{\Sigma}_{0}$.

Furthermore,
$\mathbb{E}(\partial_{\boldsymbol{\theta}\mathbf{y}^{e\prime}}\mathcal{L}_{i,n}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e}_{s})|\boldsymbol{\chi}_{n})=\big{(}\Sigma_{11,i}\boldsymbol{z}_{i}^{\prime},\leavevmode\nobreak\
\mathcal{H}_{i}\otimes\boldsymbol{\Sigma}_{12,i}\big{)}^{\prime}\sum_{g^{\prime}\in
G}\alpha^{g_{i}g^{\prime}}\boldsymbol{w}_{s,i}^{g_{i}g^{\prime}}$. As
$\mathbf{y}^{e}=\mathbf{L}(\boldsymbol{\theta}_{0},\leavevmode\nobreak\
\mathbf{y}^{e})$,
$\partial_{\boldsymbol{\theta}}\mathbf{y}^{e}=\mathbf{B}^{-1}[\mathbf{D}\bar{\mathbf{Y}},\leavevmode\nobreak\
\mathbf{D}\mathbf{Z},\leavevmode\nobreak\ \mathcal{H}_{i}\otimes\mathbf{F}]$,
where
$\textstyle\mathbf{D}=\operatorname{diag}(\sum_{r=1}^{R}f_{1,r},\leavevmode\nobreak\
\dots,\leavevmode\nobreak\ \sum_{r=1}^{R}f_{n,r})$, $\mathbf{F}$ is a matrix
of dimension $n\times(R-1)$, with the $(i,\leavevmode\nobreak\ r)$-th entry
being $f_{i,r}$, $\mathbf{B}=\mathbf{I}_{n}-\mathbf{D}\sum_{g,g^{\prime}\in
G}\alpha^{gg^{\prime}}\mathbf{W}^{gg^{\prime}}$, and $\mathbf{I}_{n}$ is the
identity matrix of dimension $n$. Let
$\displaystyle\boldsymbol{\Omega}_{n}=\frac{1}{n}\sum_{i=1}^{n}\big{(}\Sigma_{11,i}\boldsymbol{z}_{i}^{\prime},\leavevmode\nobreak\
\mathcal{H}_{i}\otimes\boldsymbol{\Sigma}_{12,i}\big{)}^{\prime}\sum_{g^{\prime}\in
G}\alpha^{g_{i}g^{\prime}}\boldsymbol{w}_{s,i}^{g_{i}g^{\prime}}\mathbf{B}^{-1}[\mathbf{D}\bar{\mathbf{Y}},\leavevmode\nobreak\
\mathbf{D}\mathbf{Z},\leavevmode\nobreak\ \mathcal{H}_{i}\otimes\mathbf{F}]$
and
$\displaystyle\boldsymbol{\Omega}_{0}=\operatorname{plim}\boldsymbol{\Omega}_{n}$.
Thus, $\mathbf{H}_{2,0}=\boldsymbol{\Omega}_{0}$. It follows that

$\sqrt{n}(\hat{\boldsymbol{\theta}}_{n}-\boldsymbol{\theta}_{0})\overset{d}{\to}\mathcal{N}\left(0,(\boldsymbol{\Omega}_{0}-\boldsymbol{\Sigma}_{0})^{-1}\boldsymbol{\Sigma}_{0}(\boldsymbol{\Omega}_{0}^{\prime}-\boldsymbol{\Sigma}_{0}^{\prime})^{-1}\right),$

where $\boldsymbol{\Sigma}_{0}$ and $\boldsymbol{\Omega}_{0}$ can be estimated
by replacing $\boldsymbol{\theta}_{0}$ and $\mathbf{y}^{e}$ in
$\boldsymbol{\Sigma}_{n}$ and $\boldsymbol{\Omega}_{n}$ with their NPL
estimators.

###  B.3 Additional Results on the Empirical Applications

####  B.3.1 Data Replications Using the Estimated Models

To assess the performance of the model in replicating observed data, I
generate the number of extracurricular activities using the estimated
coefficients as assigned values to the parameters (as in the Monte Carlo
simulations). The matrix of control variables $\mathbf{X}$ and the network are
kept fixed at their observed values in the sample. Figure B.1 displays the
distribution of the observed count outcome alongside simulated outcomes.

Figure B.1: Histograms of the observed and simulated dependent variables

Notes: This figure presents distributions of the number of extracurricular
activities students attend using real data and simulations from estimated
models. The simulations are obtained using the estimated coefficients from
various models and by fixing the network and the control variables in
$\mathbf{X}$ to their observed values from the empirical sample.

Panel (A) represents the distribution of the observed data. The predictions
are all based on the specifications controlling for unobserved school
heterogeneity. Panel (B) shows the predicted data from the specification with
a quadratic cost function; i.e., evenly spaced thresholds (Model 5). Like DGP
A in the Monte Carlo study, the simulated data exhibit a symmetric
distribution left-truncated at zero with a thin tail. This specification fails
to replicate the observed data. Panel (C) presents the predicted data from the
specification with semiparametric cost (Model 4), while Panel (D) displays the
prediction using the specification addressing heterogeneity in peer effects
and network endogeneity (Model 8). Both predictions are similar and appear to
replicate the observed data because they rely on semiparametric costs.

####  B.3.2 Full Estimation Results

This section presents the full results of the empirical application. Models
1–3 (Table B.1) assume an exogenous network without accounting for
heterogeneity in the peer effects. Model 1 is based on a semiparametric cost
function, Model 2 imposes a quadratic cost function, and Model 3 is a Tobit
SAR model. Models 4–6 (Table B.2) are the fixed-effect versions of Models 1–3,
respectively. I introduce heterogeneity in the peer effects in Models 7–9
(Table B.3). I address potential network endogeneity by controlling for
unobserved student attributes that may influence their participation and their
likelihood of making friends. I estimate these unobserved attributes using
both fixed effect (FE) and Bayesian random effect (BRE) network formation
models (see Section 3.4). Model 8 incorporates the unobserved attributes
estimated using the FE approach, whereas Model 9 includes those estimated
using the BRE approach.

Table B.1: Empirical results – Exogenous network without fixed effects

|  | Model 1: Semiparametric cost | Model 2: Quadratic cost | Model 3: Tobit
---|---|---|---|---
|  | Coef. | Marginal effects | Coef. | Marginal effects | Coef. | Marginal effects
Peer Effects | $0.043$ | $0.082$ | (0.027) | $0.273$ | $0.543$ | (0.026) | $0.681$ | $0.553$ | (0.018)
Own effects
Age | $-0.056$ | $-0.105$ | (0.006) | $-0.008$ | $-0.017$ | (0.007) | $-0.018$ | $-0.015$ | (0.004)
Male | $-0.147$ | $-0.276$ | (0.017) | $-0.098$ | $-0.195$ | (0.018) | $-0.246$ | $-0.200$ | (0.011)
Hispanic | $-0.062$ | $-0.118$ | (0.025) | $0.015$ | $0.029$ | (0.027) | $0.025$ | $0.020$ | (0.017)
Race |  |  |  |  |  |  |  |  |
| Black | $0.074$ | $0.139$ | (0.029) | $0.103$ | $0.204$ | (0.032) | $0.241$ | $0.195$ | (0.019)
| Asian | $0.192$ | $0.361$ | (0.034) | $0.276$ | $0.549$ | (0.037) | $0.668$ | $0.542$ | (0.022)
| Other | $0.054$ | $0.101$ | (0.028) | $0.087$ | $0.173$ | (0.029) | $0.211$ | $0.171$ | (0.018)
Year in school | $0.050$ | $0.094$ | (0.007) | $0.051$ | $0.101$ | (0.008) | $0.123$ | $0.100$ | (0.005)
Living with both parents | $0.085$ | $0.159$ | (0.019) | $0.066$ | $0.131$ | (0.020) | $0.161$ | $0.131$ | (0.012)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.077$ | $-0.144$ | (0.023) | $-0.027$ | $-0.054$ | (0.024) | $-0.068$ | $-0.055$ | (0.015)
|  $>$ High | $0.203$ | $0.383$ | (0.019) | $0.155$ | $0.309$ | (0.020) | $0.381$ | $0.309$ | (0.012)
| Missing | $0.027$ | $0.051$ | (0.032) | $0.091$ | $0.182$ | (0.033) | $0.211$ | $0.171$ | (0.021)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.125$ | $0.236$ | (0.025) | $0.087$ | $0.173$ | (0.026) | $0.216$ | $0.176$ | (0.016)
| Other | $0.037$ | $0.069$ | (0.020) | $0.024$ | $0.047$ | (0.021) | $0.061$ | $0.049$ | (0.013)
| Missing | $-0.053$ | $-0.100$ | (0.028) | $-0.034$ | $-0.067$ | (0.030) | $-0.085$ | $-0.069$ | (0.019)
Contextual effects
Age | $-0.006$ | $-0.011$ | (0.004) | $-0.032$ | $-0.063$ | (0.004) | $-0.077$ | $-0.062$ | (0.003)
Male | $-0.013$ | $-0.025$ | (0.030) | $0.044$ | $0.087$ | (0.029) | $0.106$ | $0.086$ | (0.019)
Hispanic | $-0.139$ | $-0.262$ | (0.041) | $-0.064$ | $-0.127$ | (0.040) | $-0.148$ | $-0.120$ | (0.025)
Race |  |  |  |  |  |  |  |  |
| Black | $-0.019$ | $-0.036$ | (0.037) | $-0.069$ | $-0.137$ | (0.038) | $-0.161$ | $-0.131$ | (0.024)
| Asian | $-0.118$ | $-0.222$ | (0.049) | $-0.242$ | $-0.482$ | (0.048) | $-0.587$ | $-0.477$ | (0.031)
| Other | $-0.071$ | $-0.135$ | (0.052) | $-0.115$ | $-0.229$ | (0.051) | $-0.279$ | $-0.226$ | (0.033)
Year in school | $0.039$ | $0.074$ | (0.010) | $-0.011$ | $-0.022$ | (0.010) | $-0.029$ | $-0.024$ | (0.006)
Living with both parents | $0.178$ | $0.335$ | (0.037) | $0.030$ | $0.059$ | (0.037) | $0.069$ | $0.056$ | (0.024)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.154$ | $-0.291$ | (0.043) | $-0.092$ | $-0.182$ | (0.042) | $-0.226$ | $-0.183$ | (0.027)
|  $>$ High | $0.195$ | $0.368$ | (0.039) | $0.010$ | $0.020$ | (0.037) | $0.015$ | $0.012$ | (0.024)
| Missing | $-0.055$ | $-0.103$ | (0.061) | $-0.101$ | $-0.201$ | (0.061) | $-0.253$ | $-0.206$ | (0.039)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.195$ | $0.367$ | (0.048) | $0.040$ | $0.080$ | (0.047) | $0.092$ | $0.074$ | (0.030)
| Other | $0.071$ | $0.134$ | (0.038) | $-0.002$ | $-0.003$ | (0.037) | $-0.007$ | $-0.006$ | (0.024)
| Missing | $-0.012$ | $-0.023$ | (0.054) | $-0.012$ | $-0.024$ | (0.054) | $-0.026$ | $-0.021$ | (0.035)
$\bar{R}_{c}$ | 13 | 1 |  |  |
Log likelihood | $-127,626$ | $-159,924$ | $-161,225$

  * Notes: Columns Coef. indicate the estimates for the coefficients, whereas Columns Marginal effects report the marginal effects and their corresponding standard errors in parentheses. $\bar{R}_{c}$ indicates the value at which the cost function switches from nonparametric to quadratic. For a fully quadratic cost function, $\bar{R}_{c}=1$. For the semiparametric cost approach, the best $\bar{R}_{c}$ is determined by minimizing the BIC. The sample used in this empirical application consists of $n=\text{72,291}$ students from $S=120$ schools.

Table B.2: Empirical results – Exogenous network with fixed effects

|  | Model 4: Semiparametric cost | Model 5: Quadratic cost | Model 6: Tobit
---|---|---|---|---
|  | Coef. | Marginal effects | Coef. | Marginal effects | Coef. | Marginal effects
Peer Effects | $0.043$ | $0.079$ | (0.023) | $0.188$ | $0.369$ | (0.029) | $0.446$ | $0.362$ | (0.019)
Own effects
Age | $-0.051$ | $-0.095$ | (0.008) | $-0.019$ | $-0.038$ | (0.008) | $-0.048$ | $-0.039$ | (0.005)
Male | $-0.160$ | $-0.297$ | (0.016) | $-0.106$ | $-0.208$ | (0.017) | $-0.262$ | $-0.213$ | (0.011)
Hispanic | $-0.007$ | $-0.013$ | (0.026) | $0.051$ | $0.101$ | (0.027) | $0.114$ | $0.092$ | (0.017)
Race |  |  |  |  |  |  |  |  |
| Black | $0.133$ | $0.246$ | (0.030) | $0.129$ | $0.253$ | (0.031) | $0.303$ | $0.246$ | (0.020)
| Asian | $0.221$ | $0.410$ | (0.034) | $0.293$ | $0.575$ | (0.036) | $0.699$ | $0.567$ | (0.023)
| Other | $0.065$ | $0.120$ | (0.028) | $0.092$ | $0.181$ | (0.029) | $0.220$ | $0.178$ | (0.018)
Year in school | $0.043$ | $0.080$ | (0.007) | $0.050$ | $0.098$ | (0.008) | $0.120$ | $0.097$ | (0.005)
Living with both parents | $0.083$ | $0.154$ | (0.019) | $0.066$ | $0.130$ | (0.020) | $0.159$ | $0.129$ | (0.012)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.061$ | $-0.113$ | (0.023) | $-0.019$ | $-0.036$ | (0.024) | $-0.047$ | $-0.038$ | (0.015)
|  $>$ High | $0.210$ | $0.389$ | (0.019) | $0.163$ | $0.321$ | (0.020) | $0.396$ | $0.321$ | (0.013)
| Missing | $0.032$ | $0.059$ | (0.031) | $0.096$ | $0.189$ | (0.033) | $0.220$ | $0.179$ | (0.021)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.140$ | $0.259$ | (0.024) | $0.098$ | $0.193$ | (0.025) | $0.241$ | $0.195$ | (0.016)
| Other | $0.047$ | $0.086$ | (0.020) | $0.029$ | $0.057$ | (0.021) | $0.072$ | $0.058$ | (0.013)
| Missing | $-0.039$ | $-0.073$ | (0.028) | $-0.027$ | $-0.052$ | (0.030) | $-0.069$ | $-0.056$ | (0.019)
Contextual effects
Age | $-0.007$ | $-0.013$ | (0.004) | $-0.027$ | $-0.053$ | (0.005) | $-0.062$ | $-0.051$ | (0.003)
Male | $-0.032$ | $-0.059$ | (0.030) | $0.015$ | $0.029$ | (0.030) | $0.026$ | $0.021$ | (0.019)
Hispanic | $-0.063$ | $-0.117$ | (0.042) | $-0.020$ | $-0.039$ | (0.042) | $-0.046$ | $-0.037$ | (0.027)
Race |  |  |  |  |  |  |  |  |
| Black | $0.005$ | $0.009$ | (0.038) | $-0.036$ | $-0.070$ | (0.039) | $-0.075$ | $-0.061$ | (0.025)
| Asian | $-0.018$ | $-0.032$ | (0.053) | $-0.140$ | $-0.274$ | (0.054) | $-0.325$ | $-0.264$ | (0.035)
| Other | $-0.070$ | $-0.130$ | (0.052) | $-0.102$ | $-0.201$ | (0.053) | $-0.242$ | $-0.196$ | (0.034)
Year in school | $0.021$ | $0.040$ | (0.011) | $-0.007$ | $-0.014$ | (0.011) | $-0.016$ | $-0.013$ | (0.007)
Living with both parents | $0.168$ | $0.310$ | (0.036) | $0.068$ | $0.134$ | (0.038) | $0.170$ | $0.138$ | (0.024)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.131$ | $-0.244$ | (0.043) | $-0.075$ | $-0.147$ | (0.044) | $-0.183$ | $-0.149$ | (0.028)
|  $>$ High | $0.212$ | $0.393$ | (0.038) | $0.078$ | $0.154$ | (0.039) | $0.193$ | $0.156$ | (0.025)
| Missing | $-0.064$ | $-0.118$ | (0.061) | $-0.075$ | $-0.147$ | (0.063) | $-0.183$ | $-0.148$ | (0.040)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.223$ | $0.413$ | (0.048) | $0.107$ | $0.210$ | (0.049) | $0.263$ | $0.213$ | (0.031)
| Other | $0.083$ | $0.154$ | (0.038) | $0.032$ | $0.062$ | (0.039) | $0.080$ | $0.065$ | (0.025)
| Missing | $0.015$ | $0.028$ | (0.054) | $0.023$ | $0.045$ | (0.056) | $0.062$ | $0.050$ | (0.036)
$\bar{R}_{c}$ | 13 | 1 |  |  |
Log likelihood | $-126,111$ | $-158,964$ | $-160,258$

  * Notes: Columns Coef. indicate the estimates for the coefficients, whereas Columns Marginal effects report the marginal effects and their corresponding standard errors in parentheses. $\bar{R}_{c}$ indicates the value at which the cost function switches from nonparametric to quadratic. For a fully quadratic cost function, $\bar{R}_{c}=1$. For the semiparametric cost approach, the best $\bar{R}_{c}$ is determined by minimizing the BIC. The sample used in this empirical application consists of $n=\text{72,291}$ students from $S=120$ schools.

Table B.3: Empirical results – Endogenous network with fixed effects and
heterogenous peer effects

|  | Model 7: Endogeneity (No) | Model 8: Endogeneity (FE) | Model 9: Endogeneity (BRE)
---|---|---|---|---
|  | Coef. | Marginal effects | Coef. | Marginal effects | Coef. | Marginal effects
Peer Effects${}^{\text{Male}\leavevmode\nobreak\ \text{Male}}$ | $-0.024$ | $-0.022$ | (0.009) | $0.004$ | $0.004$ | (0.008) | $0.007$ | $0.007$ | (0.008)
Peer Effects${}^{\text{Male}\leavevmode\nobreak\ \text{Female}}$ | $0.071$ | $0.066$ | (0.006) | $0.041$ | $0.039$ | (0.006) | $0.039$ | $0.036$ | (0.006)
Peer Effects${}^{\text{Female}\leavevmode\nobreak\ \text{Male}}$ | $0.069$ | $0.061$ | (0.006) | $0.054$ | $0.048$ | (0.006) | $0.049$ | $0.043$ | (0.006)
Peer Effects${}^{\text{Female}\leavevmode\nobreak\ \text{Female}}$ | $0.034$ | $0.030$ | (0.008) | $0.041$ | $0.036$ | (0.008) | $0.043$ | $0.038$ | (0.007)
Own effects
Age | $-0.050$ | $-0.091$ | (0.007) | $-0.046$ | $-0.083$ | (0.008) | $-0.045$ | $-0.081$ | (0.007)
Male | $-0.224$ | $-0.408$ | (0.035) | $-0.221$ | $-0.402$ | (0.035) | $-0.226$ | $-0.411$ | (0.035)
Hispanic | $-0.008$ | $-0.015$ | (0.025) | $-0.007$ | $-0.013$ | (0.025) | $-0.005$ | $-0.009$ | (0.025)
Race |  |  |  |  |  |  |  |  |
| Black | $0.138$ | $0.251$ | (0.029) | $0.230$ | $0.419$ | (0.031) | $0.195$ | $0.354$ | (0.030)
| Asian | $0.227$ | $0.412$ | (0.033) | $0.196$ | $0.356$ | (0.034) | $0.211$ | $0.383$ | (0.034)
| Other | $0.067$ | $0.122$ | (0.027) | $0.025$ | $0.045$ | (0.027) | $0.031$ | $0.056$ | (0.027)
Year in school | $0.042$ | $0.077$ | (0.007) | $0.028$ | $0.052$ | (0.007) | $0.026$ | $0.047$ | (0.007)
Living with both parents | $0.081$ | $0.147$ | (0.018) | $0.072$ | $0.131$ | (0.018) | $0.071$ | $0.129$ | (0.018)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.059$ | $-0.108$ | (0.022) | $-0.058$ | $-0.105$ | (0.022) | $-0.056$ | $-0.101$ | (0.022)
|  $>$ High | $0.209$ | $0.380$ | (0.019) | $0.203$ | $0.369$ | (0.019) | $0.202$ | $0.368$ | (0.019)
| Missing | $0.031$ | $0.057$ | (0.031) | $0.022$ | $0.041$ | (0.031) | $0.024$ | $0.044$ | (0.031)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.134$ | $0.243$ | (0.024) | $0.132$ | $0.240$ | (0.024) | $0.132$ | $0.240$ | (0.024)
| Other | $0.042$ | $0.077$ | (0.020) | $0.035$ | $0.063$ | (0.020) | $0.034$ | $0.062$ | (0.020)
| Missing | $-0.039$ | $-0.071$ | (0.028) | $-0.042$ | $-0.077$ | (0.028) | $-0.042$ | $-0.076$ | (0.028)
Contextual effects
Age | $-0.009$ | $-0.016$ | (0.004) | $-0.020$ | $-0.036$ | (0.009) | $-0.017$ | $-0.032$ | (0.004)
Male | $0.006$ | $0.011$ | (0.050) | $-0.038$ | $-0.070$ | (0.049) | $-0.037$ | $-0.067$ | (0.048)
Hispanic | $-0.061$ | $-0.111$ | (0.041) | $-0.063$ | $-0.114$ | (0.041) | $-0.064$ | $-0.116$ | (0.041)
Race |  |  |  |  |  |  |  |  |
| Black | $0.011$ | $0.019$ | (0.037) | $0.021$ | $0.039$ | (0.038) | $0.025$ | $0.046$ | (0.037)
| Asian | $-0.003$ | $-0.005$ | (0.051) | $0.010$ | $0.018$ | (0.052) | $0.000$ | $0.000$ | (0.051)
| Other | $-0.066$ | $-0.121$ | (0.051) | $-0.071$ | $-0.128$ | (0.051) | $-0.071$ | $-0.130$ | (0.051)
Year in school | $0.018$ | $0.034$ | (0.011) | $0.021$ | $0.038$ | (0.011) | $0.022$ | $0.041$ | (0.011)
Living with both parents | $0.166$ | $0.303$ | (0.035) | $0.138$ | $0.252$ | (0.035) | $0.145$ | $0.265$ | (0.035)
Mother education |  |  |  |  |  |  |  |  |
|  $<$ High | $-0.122$ | $-0.222$ | (0.042) | $-0.127$ | $-0.232$ | (0.043) | $-0.119$ | $-0.216$ | (0.042)
|  $>$ High | $0.206$ | $0.375$ | (0.035) | $0.181$ | $0.330$ | (0.035) | $0.180$ | $0.328$ | (0.035)
| Missing | $-0.057$ | $-0.103$ | (0.059) | $-0.064$ | $-0.116$ | (0.060) | $-0.054$ | $-0.098$ | (0.060)
Mother job |  |  |  |  |  |  |  |  |
| Professional | $0.213$ | $0.388$ | (0.045) | $0.176$ | $0.319$ | (0.046) | $0.180$ | $0.328$ | (0.046)
| Other | $0.076$ | $0.139$ | (0.037) | $0.041$ | $0.075$ | (0.038) | $0.047$ | $0.086$ | (0.037)
| Missing | $0.014$ | $0.025$ | (0.053) | $-0.012$ | $-0.022$ | (0.054) | $-0.005$ | $-0.008$ | (0.053)
$\bar{R}_{c}$ | 10 | 10 | 10
Log likelihood | $-125,667$ | $-125,096$ | $-125,037$

  * Notes: Columns Coef. indicate the estimates for the coefficients, whereas Columns Marginal effects report the marginal effects and their corresponding standard errors in parentheses. $\bar{R}_{c}$ indicates the value at which the cost function switches from nonparametric to quadratic. The best $\bar{R}_{c}$ is determined by minimizing the BIC. Peer Effects${}^{gg^{\prime}}$ indicates the effects of peers in group $\mathcal{G}_{g^{\prime}}$ on students in group $\mathcal{G}_{g}$, where $g,\leavevmode\nobreak\ g^{\prime}\in\\{\text{Male},\text{Female}\\}$. I use two methods to address the network endogeneity issue. The first method estimates the unobserved students’ attributes using a fixed effect (FE) logit model, and the second one employs a Bayesian random effect (BRE) probit model (see OA B.3.3). The sample used in this empirical application consists of $n=\text{72,291}$ students from $S=120$ schools.

####  B.3.3 Bayesian Estimation of the Dyadic Linking Model

This section presents a data augmentation (DA) approach to estimate the dyadic
linking model of Section 3.4 following Albert and Chib (1993). Let
$a_{ij}^{\ast}=\boldsymbol{v}_{ij}^{\prime}\boldsymbol{\psi}+\mu_{i}+\nu_{j}+\bar{\varepsilon}_{ij}$,
where $\bar{\varepsilon}_{ij}$ is independent and normally distributed across
$i$ and $j$. Assume that the distribution function of $\bar{\varepsilon}_{ij}$
is $\Phi$. This means that
$\mathbb{P}\left(a_{ij}^{\ast}>0|\boldsymbol{v}_{ij},\leavevmode\nobreak\
\mu_{i},\leavevmode\nobreak\
\nu_{j}\right)=\mathbb{P}\left(a_{ij}=1|\boldsymbol{v}_{ij},\leavevmode\nobreak\
\mu_{i},\leavevmode\nobreak\
\nu_{j}\right)=\Phi\left(\boldsymbol{v}_{ij}^{\prime}\boldsymbol{\psi}+\mu_{i}+\nu_{j}\right)$
. The DA approach treats $\mu_{i}$ and $\nu_{j}$ as random effects
(independent of $\boldsymbol{v}_{ij}$) that are normally distributed. Given
that $\boldsymbol{v}_{ij}$ includes an intercept term, I impose the
restrictions $\mathbb{E}\left(\mu_{i}\right)=0$ and
$\mathbb{E}\left(\mu_{j}\right)=0$. I control for potential correlation
between $\mu_{i}$ and $\nu_{i}$. The covariance matrix of
$\mathbf{d}_{i}=(\mu_{i},\leavevmode\nobreak\ \nu_{i})^{\prime}$ is denoted by

$\boldsymbol{\Sigma}_{\mu,\nu}=\begin{pmatrix}\sigma_{\mu}^{2}&\rho_{\mu,\nu}\sigma_{\mu}\sigma_{\nu}\\\
\rho_{\mu,\nu}\sigma_{\mu}\sigma_{\nu}&\sigma_{\nu}^{2}\end{pmatrix},$

where $\mathbb{E}(\mu_{i}^{2})=\sigma_{\mu}^{2}$,
$\mathbb{E}(\nu_{i}^{2})=\sigma_{\nu}^{2}$, and $\rho_{\mu,\nu}$ is the
correlation between $\mu_{i}$ and $\nu_{i}$. For all $i$ and $j$, I Assume
that $(\mu_{i},\leavevmode\nobreak\ \nu_{i})^{\prime}$ and
$(\mu_{j},\leavevmode\nobreak\ \nu_{j})^{\prime}$ are independent if $i\neq
j$.

Given a large number of observations in the network formation model, I set
flat prior distributions for $\boldsymbol{\psi}$, $\sigma_{\mu,}^{2}$,
$\sigma_{\nu}^{2}$, and $\rho_{\mu,\nu}$. Let
$\mathbf{a}^{\ast}_{s}=\left(a_{ij}^{\ast}:i,\leavevmode\nobreak\
j\in\mathcal{P}_{s},\leavevmode\nobreak\ i\neq j\right)^{\prime}$,
$\mathbf{a}_{s}=(a_{ij}:i,\leavevmode\nobreak\
j\in\mathcal{P}_{s},\leavevmode\nobreak\ i\neq j)^{\prime}$,
$\mathbf{V}_{s}=(\boldsymbol{v}_{ij}:i,\leavevmode\nobreak\
j\in\mathcal{P}_{s},\leavevmode\nobreak\ i\neq j)^{\prime}$,
$\boldsymbol{\mu}_{s}=(\mu_{1},\leavevmode\nobreak\ \dots,\leavevmode\nobreak\
\mu_{n_{s}})^{\prime}$, and
$\boldsymbol{\nu}_{s}=(\nu_{1},\leavevmode\nobreak\ \dots,\leavevmode\nobreak\
\nu_{n_{s}})^{\prime}$. The posterior distribution of $\mathbf{a}^{\ast}_{s}$
conditional on $\boldsymbol{\psi}$, $\mathbf{a}_{s}$, $\mathbf{V}_{s}$,
$\boldsymbol{\mu}_{s}$, and $\boldsymbol{\nu}_{s}$ is proportional to:

$\prod_{\begin{subarray}{c}i,j\in\mathcal{P}_{s}\\\ i\neq
j\end{subarray}}\left\\{\mathbbm{1}\left\\{a_{ij}^{\ast}\geq
0,\leavevmode\nobreak\
a_{ij}=1\right\\}+\mathbbm{1}\left\\{a_{ij}^{\ast}<0,\leavevmode\nobreak\
a_{ij}=0\right\\}\right\\}\dfrac{1}{2}\left(a_{ij}^{\ast}-\boldsymbol{v}_{ij}^{\prime}\boldsymbol{\psi}-\mu_{i}-\nu_{j}\right)^{2}.$

This means that the posterior conditional distribution of each $a_{ij}^{\ast}$
is
$\mathcal{N}(\boldsymbol{v}_{ij}^{\prime}\boldsymbol{\psi}+\mu_{i}+\nu_{j},\leavevmode\nobreak\
1)$, truncated at the left by 0 if $a_{ij}=1$, and truncated at the right by 0
if $a_{ij}=0$.

The posterior distribution of $\boldsymbol{\psi}$ given
$\mathbf{a}^{\ast}_{1}$, …, $\mathbf{a}^{\ast}_{S}$, $\mathbf{V}_{1}$, …,
$\mathbf{V}_{S}$, $\boldsymbol{\mu}_{1}$, …, $\boldsymbol{\mu}_{S}$, and
$\boldsymbol{\nu}_{1}$, …, $\boldsymbol{\nu}_{S}$ is:

$\textstyle\mathcal{N}\left(\left(\sum_{s=1}^{S}\mathbf{V}^{\prime}_{s}\mathbf{V}_{s}\right)^{-1}\sum_{s=1}^{S}\mathbf{V}^{\prime}_{s}\tilde{\mathbf{a}}_{s},\leavevmode\nobreak\
\left(\sum_{s=1}^{S}\mathbf{V}^{\prime}_{s}\mathbf{V}_{s}\right)^{-1}\right),$

where
$\tilde{\mathbf{a}}_{s}=(a_{ij}^{\ast}-\mu_{i}-\nu_{j}:i,\leavevmode\nobreak\
j\in\mathcal{P}_{s},\leavevmode\nobreak\ i\neq j)^{\prime}$.

For any $s$ and $i\in\mathcal{P}_{s}$, the posterior distribution of
$\mathbf{d}_{i}=(\mu_{i},\leavevmode\nobreak\ \nu_{i})^{\prime}$ conditional
on $\boldsymbol{\psi}$, $\mathbf{a}^{\ast}_{s}$, $\mathbf{V}_{s}$,
$\boldsymbol{\mu}_{s,-i}=(\mu_{j}:j\in\mathcal{P}_{s},\leavevmode\nobreak\
j\neq i)^{\prime}$,
$\boldsymbol{\nu}_{s,-i}=(\nu_{j}:j\in\mathcal{P}_{s},\leavevmode\nobreak\
j\neq i)^{\prime}$, $\sigma_{\mu}$, $\sigma_{\nu}$, and $\rho_{\mu,\nu}$ is
$\mathcal{N}(\boldsymbol{m}_{s},\leavevmode\nobreak\
\boldsymbol{\Lambda}_{s}^{-1})$, where

$\boldsymbol{\Lambda}_{s}=\boldsymbol{\Sigma}_{\mu,\nu}^{-1}+\begin{pmatrix}n_{s}-1&0\\\
0&n_{s}-1\end{pmatrix}\quad\text{and}\quad\boldsymbol{m}_{s}=\boldsymbol{\Lambda}_{s}^{-1}\begin{pmatrix}\textstyle\sum_{\begin{subarray}{c}j\in\mathcal{P}_{s}\\\
j\neq
i\end{subarray}}(a_{ij}^{\ast}-\boldsymbol{v}_{ij}^{\prime}\boldsymbol{\psi}-\nu_{j})\\\
\sum_{\begin{subarray}{c}j\in\mathcal{P}_{s}\\\ j\neq
i\end{subarray}}(a_{ji}^{\ast}-\boldsymbol{v}_{ji}^{\prime}\boldsymbol{\psi}-\mu_{j})\end{pmatrix}.$

Finally, the posterior distribution of
$\boldsymbol{\Sigma}_{\mu,\nu}=\begin{pmatrix}\sigma_{\mu}^{2}&\rho_{\mu,\nu}\sigma_{\mu}\sigma_{\nu}\\\
\rho_{\mu,\nu}\sigma_{\mu}\sigma_{\nu}&\sigma_{\nu}^{2}\end{pmatrix}$
conditional on $\boldsymbol{\mu}_{1}$, …, $\boldsymbol{\mu}_{S}$ and
$\boldsymbol{\nu}_{1}$, …, $\boldsymbol{\nu}_{S}$ is $\text{Inverse-
Wishart}\left(n,\leavevmode\nobreak\
\sum_{i=1}^{n}\mathbf{d}_{i}\mathbf{d}_{i}^{\prime}\right)$.

As all posterior conditional distributions have closed forms, a Gibbs sampler
can be used to simulate the parameters. In practice, the MCMC converges very
quickly. I perform T = 20,000 simulations and keep the last 10,000. As the
number of parameters in the model is large, I randomly choose some parameters
and present their posterior distribution in Figure B.2.

Figure B.2: Posterior distribution of the network formation model parameters

This figure displays the posterior distribution of $\boldsymbol{\psi}$,
$\mu_{i}$ and $\nu_{i}$ for some $i$ chosen at random, $\sigma_{\mu}^{2}$,
$\sigma_{\nu}^{2}$, and $\rho_{\mu,\nu}$. The blue lines represent the Gibbs
samplings from the posterior and the dashed line indicates the posterior
confidence intervals using the last 10,000 simulations. The results suggest
that same-sex students, Hispanic, White, Black, and Asian students, and
students whose mothers hold professional jobs are likely to form links.
Moreover, students of similar age and students who have spent a similar number
of years at their current school are likely to form links.


A note on a problem invoving a square in a curvilinear triangle

A note on a problem invoving a square in a curvilinear triangle

Hiroshi Okumura

Abstract. A problem involving a square in the curvilinear triangle made by two
touching congruent circles and their common tangent is generalized.

Keywords. square in a curvilinear triangle

Mathematics Subject Classification (2010). 01A27, 51M04

Let $\alpha_{1}$ and $\alpha_{2}$ be touching circles of radius $a$ with
external common tangent $t$. In this note we consider the following problem
[1, 4, 5] (see Figure 1).

######  Problem 1.

$ABCD$ is a square such that the side $DA$ lies on $t$ and the points $C$ and
$B$ lie on $\alpha_{1}$ and $\alpha_{2}$, respectively. Show that $2a=5|AB|$.

Figure 1.

If $\gamma_{1}$, $\gamma_{2}$, $\cdots$, $\gamma_{n}$ are congruent circles
touching a line $s$ from the same side such that $\gamma_{1}$ and $\gamma_{2}$
touch and $\gamma_{i}$ $(i=3,4,\cdots,n)$ touches $\gamma_{i-1}$ from the side
opposite to $\gamma_{1}$, then $\gamma_{1}$, $\gamma_{2}$, $\cdots$,
$\gamma_{n}$ are called congruent circles on $s$. The curvilinear triangle
made by $\alpha_{1}$, $\alpha_{2}$ and $t$ is denoted by $\Delta$. The
incircle of $\Delta$ touches $\alpha_{1}$ and $\alpha_{2}$ at $C$ and $B$,
respectively as in Figure 1. Indeed the problem is generalized as follows (see
Figure 1):

######  Theorem 1.

If $\beta_{1}$, $\beta_{2}$, $\cdots$, $\beta_{n}$ are congruent circles on
$t$ lying in $\Delta$ such that $\beta_{1}$ touches $\alpha_{1}$ at a point
$C$ and $\beta_{n}$ touches $\alpha_{2}$ at a point $B$ and $A$ is the foot of
perpendicular from $B$ to $t$, then the following relations hold.
(i) $n|AB|=|BC|$.
(ii) $2a=\left(\left(\sqrt{n}+1\right)^{2}+1\right)|AB|$.

###### Proof.

Let $b$ be the radius of $\beta_{1}$. By Theorem 5.1 in [2] we have

(1) $a=(\sqrt{n}+1)^{2}b.$

Let $d=|AB|$. Since $C$ divides the segment joining the centers of
$\alpha_{1}$ and $\beta_{1}$ in the ratio $a:b$ internally, we have

(2) $\frac{d-b}{b}=\frac{a-b}{a+b}.$

Eliminating $b$ from (1) and (2), and solving the resulting equation for $d$,
we get $d=2a/(1+(1\pm\sqrt{n})^{2})$. But in the minus sign case we get
$2b-d=2a(1-4\sqrt{n})/(n^{2}-n+2\sqrt{n}+2)<0$ by (1). Hence
$d=2a/(1+(1+\sqrt{n})^{2})$. This proves (ii). Let $|BC|=2h$. Then from the
right triangle formed by the line $BC$, the segment joining the centers of
$\alpha_{1}$ and $\beta_{1}$, and the perpendicular from the center of
$\alpha_{1}$ to $BC$, we get $(a-h)^{2}+(a-d)^{2}=a^{2}$. Solving the equation
for $h$, we have $h=a-\sqrt{(2a-d)d}=an/(1+(1+\sqrt{n})^{2})$. This proves
(i). ∎

Figure 2: $n=5$

The figure consisting of $\alpha_{1}$, $\alpha_{2}$, $\beta_{1}$, $\beta_{2}$,
$\cdots$, $\beta_{n}$ and $t$ is denoted by $\mathcal{B}(n)$ and considered in
[2]. Since the inradius of $\Delta$ equals $a/4$, the next theorem is also a
generalization of Problem 1 (see Figure 1).

######  Theorem 2.

Let $\beta_{1}$, $\beta_{2}$, $\cdots$, $\beta_{n}$ be congruent circles on a
line $s$. If a circle $\alpha$ of radius $a$ touches $s$ and $\beta_{1}$ and
$\beta_{n}$ externally at points $C$ and $B$, respectively, $A$ is the foot of
perpendicular from $B$ to $s$, then the following relations hold.
(i) $(n-1)|AB|=|BC|$.
(ii) $2a=((n-1)^{2}+4)|AB|/4$.

Figure 3: $n=4$

Theorem 2 is proved in a similar way as Theorem 1 using the fact that the
ratio of the radii of $\alpha$ and $\beta_{1}$ equals $(n-1)^{2}:4$ [3]. The
figure consisting of $\alpha$, $\beta_{1}$, $\beta_{2}$, $\cdots$, $\beta_{n}$
and $s$ is denoted by $\mathcal{A}(n)$ and considered in [2].

## References

  * [1] Aida ed., Sampō Tenshōhō, 1788, Tohoku Univ. WDB,
http://www.i-repository.net/il/meta_pub/G0000398wasan_4100002292.

  * [2] H. Okumura, Configurations of congruent circles on a line, Sangaku J. Math., 1 (2017) 24–34.
  * [3] H. Okumura, Variatios of the ratio $1:4$, Math. and Informatics Quarterly, 3(4) (1993) 162–166.
  * [4] Enrui Tekitō Shū, Tohoku Univ. WDB,
http://www.i-repository.net/il/meta_pub/G0000398wasan_4100003918.

  * [5] Yōjutsu Kugōhyū, Tohoku Univ. WDB,
http://www.i-repository.net/il/meta_pub/G0000398wasan_4100007186. Tohoku Univ.
WDB is short for Tohoku University Wasan Material Database.