Latent Agents in Networks: Estimation and Targeting