  The detection of nanoHertz gravitational waves through pulsar timing arrays
hinges on identifying a common stochastic process affecting all pulsars in a
correlated way across the sky. In the presence of other deterministic and
stochastic processes affecting the time-of-arrival of pulses, a detection claim
must be accompanied by a detailed assessment of the various physical or
phenomenological models used to describe the data. In this study, we propose
posterior predictive checks as a model-checking tool that relies on the
predictive performance of the models with regards to new data. We derive and
study predictive checks based on different components of the models, namely the
Fourier coefficients of the stochastic process, the correlation pattern, and
the timing residuals. We assess the ability of our checks to identify model
misspecification in simulated datasets. We find that they can accurately flag a
stochastic process spectral shape that deviates from the common power-law model
as well as a stochastic process that does not display the expected angular
correlation pattern. Posterior predictive likelihoods derived under different
assumptions about the correlation pattern can further be used to establish
detection significance. In the era of nanoHertz gravitational wave detection
from different pulsar-timing datasets, such tests represent an essential tool
in assessing data consistency and supporting astrophysical inference.
