Efforts to leverage peer effects by changing assignment have often fallen short due to endogenous peer choice. To address this, I build a two-part model: agents form networks via continuous linking decisions; conditional on realized networks, outcomes are determined. I provide results on identification of both parts of the model. Using data from a randomized study in India, I estimate the model, assess its performance in out-of-sample prediction, and simulate outcomes under preferential assignment rules. This paper contributes new methodology for identifying effects of alternative assignments in the presence of network endogeneity, as well as identification of network formation models.