Community influences on cognitive ability