Logging alters tropical forest structure, while conversion to agriculture reduces biodiversity and functioning