The primary cause for nesting failure in general is predation. Safety depends upon site selection, camouflage, and inaccessibility. Ground nesting species are more likely to fall prey to mammalian predators. Cavity nesters have a lower predation rate than both ground and open nesters. Some birds nest near protective insects or animals to reduce their risks of predation.
Many species nest very near to wasp, bees, or hornets nests to thwart predators.
Some species of African shorebirds nest in close proximity to crocodiles for the same reason. Some birds also rely on elaborate distraction displays to lead a predator off when they approach a nesting site. Sandpipers which often nest in open areas use two approaches to distract their main predators, foxes. Once the predator has been distracted they will usually take an indirect route back to the nest to further hide it's location. Nest warmth is determined by the amount of insulating materials used and will directly affect the energy requirements that must be used by the attending adult.