Essays on social networks and behavioral economics