Text this: Cognitive phantoms in large language models through the lens of latent variables