Assessing the validity of the logit method for ecological inference