A generative model of network structure based on dependency networks