We model network formation and interactions under a unified framework by considering that individuals anticipate the effect of network structure on the utility of network interactions when choosing links. There are two advantages of this modeling approach: first, we can evaluate whether network interactions drive friendship formation or not. Second, we can control for the friendship selection bias on estimated interaction effects. We provide microfoundations of this statistical model based on the subgame perfect equilibrium of a two‐stage game and propose a Bayesian MCMC approach for estimating the model. We apply the model to study American high school students' friendship networks using the Add Health dataset. From two interaction variables, GPA and smoking frequency, we find that the utility of interactions in academic learning is important for friendship formation, whereas the utility of interactions in smoking is not. However, both GPA and smoking frequency are subject to significant peer effects.