Directly measure competition functions with tree