Incorporating spatial structures in ecological inference: an information theoretic approach