  We prove under certain assumptions a formula for the cohomology of PEL-type
Rapoport--Zink spaces that "averages" over the Kottwitz set. Our formula
generalizes that of Shin's beyond the EL-type case and is proven by combining
Mantovan's formula with descriptions of the cohomology of Shimura and Igusa
varieties. We then use this averaging formula to derive a conjectural
description of the cohomology of Rapoport--Zink spaces, generalizing our
earlier work for EL-type spaces. Along the way, we give a description of the
cohomology of Igusa varieties in terms of the Langlands correspondence,
generalizing work in Shin's thesis.
