  We present LVG and non-local radiative transfer calculations involving the
rotational and hyperfine structure of the spectrum of N$_2$H$^+$ with
collisional rate coefficients recently derived by us. The goal of this study is
to check the validity of the assumptions made to treat the hyperfine structure
and to study the physical mechanisms leading to the observed hyperfine
anomalies.
  We find that the usual hypothesis of identical excitation temperatures for
all hyperfine components of the $J$=1-0 transition is not correct within the
range of densities existing in cold dense cores, i.e., a few 10$^4$ $\textless$
n(H$_2$) $\textless$ a few 10$^6$ cm$^{-3}$. This is due to different radiative
trapping effects in the hyperfine components. Moreover, within this range of
densities and considering the typical abundance of N$_2$H$^+$, the total
opacity of rotational lines has to be derived taking into account the hyperfine
structure. The error made when only considering the rotational energy structure
can be as large as 100%. Using non-local models we find that, due to
saturation, hyperfine anomalies appear as soon as the total opacity of the
$J$=1-0 transition becomes larger than $\simeq$ 20. Radiative scattering in
less dense regions enhance these anomalies, and particularly, induce a
differential increase of the excitation temperatures of the hyperfine
components. This process is more effective for the transitions with the highest
opacities for which emerging intensities are also reduced by self-absorption
effects. These effects are not as critical as in HCO$^+$ or HCN, but should be
taken into account when interpreting the spatial extent of the N$_2$H$^+$
emission in dark clouds.
