Social influence cannot be identified from purely observational data on social networks, because such influence is generically confounded with latent homophily, i.e., with a nodes network partners being informative about the nodes attributes and therefore its behavior. If the network grows according to either a latent community (stochastic block) model, or a continuous latent space model, then latent homophilous attributes can be consistently estimated from the global pattern of social ties. We show that, for comm