Calculation of spin-dependent parameters in the Landau-Migdal theory of nuclei