We develop a Roy model of social interactions in which individuals sort into peer groups based on comparative advantage. Two key results emerge: First, when comparative advantage is the guiding principle of peer group organization, the effect of moving a student into an environment with...