Observed variations of the magnetic field strength in sunspot umbrae consist of intrinsic oscillations and ``false'' oscillations due to time-dependent opacity effects. Here we present an approach intended for the separation of these components. We develop a mathematical formalism based on the analytical solution of the MHD equations including gravity, inclination of the magnetic field, and effects of nonadiabaticity. The theoretical results are compared with observations in the near-infrared at 1.56 μm by Bellot Rubio and coworkers using the Tenerife Infrared Polarimeter. It is shown that part of the detected field strength variations can be intrinsic magnetic field oscillations caused by magnetoacoustic waves.