Radio-to-γ-ray monitoring of the narrow-line Seyfert 1 galaxy PMN J0948 + 0022 from 2008 to 2011