Population trends and urbanization: Simulating density effects using a local regression approach