Realism, ontology, and latent variables