  Magnetic-dipole (M1) excitations of $^{18}$O and $^{42}$Ca nuclei are
investigated within a relativistic nuclear energy density functional framework.
In our last work \cite{2019OP}, these nuclei are found to have unique M1
excitation and its sum rule, because of their characteristic structure: the
system consists of the shell-closure core plus two neutrons. For a more
systematic investigation of the M1 mode, we have implemented a framework based
on the relativistic nuclear energy density functional (RNEDF). For benchmark,
we have performed the RNEDF calculations combined with the random-phase
approximation (RPA). We evaluate the M1 excitation of $^{18}$O and $^{42}$Ca,
whose sum-rule value (SRV) of the M1 transitions can be useful to test the
computational implementation \cite{2019OP}. We also apply this RNEDF method to
$^{208}$Pb, whose M1 property has been precisely measured
\cite{1979Holt,1987Koehler,1988Laszewski,2016Birkhan}. Up to the level of the
M1 sum rule, our result is in agreement with the experiments, except the
discrepancy related with the quenching factors for $g$ coefficients.
